Category: Database

MySQL (102)
Oracle (26)
Redis (8)
SQLServer (2)

2013 Recap: 21 Best Open Source Databases

As a software developer or DBA, one essential part of the job is working with databases, such as MS SQL Server, MySQL, Oracle, PostgreSQL, MongoDB, and so on. As we all know, MySQL is currently the most widely used and best free open-source database …

15 Basic MySQL Interview Questions: Are DBAs Ready?

We have previously published three articles on Linux interview basics (Part 1, 2, and 3), which received positive feedback from readers. We also heard that some readers hoped this interactive learning method could be made more flexible. Action speaks louder than words, so we are now presenting you with 15 MySQL interview questionsQuestion 1: How do you …

101 MySQL Tuning and Optimization Tips

MySQL is a powerful open-source database. With the rise of database-driven applications, people have been pushing MySQL to its limits. Here are 101 tips for tuning and optimizing your MySQL installation. Some tips are specific to particular environments, but these concepts …

How to Create a New User in MySQL

Adding a User: (Note: Unlike the above, the following commands are executed in the MySQL environment, so each ends with a semicolon as the command terminator) Format: grant select on database.* to username@login_host identified by “password” First method: Add a …

How to Modify MySQL Database Table Field Encoding

Garbled characters appear when loading data with LOAD DATA INFILE. When using LOAD, the encoding of the database, table, and fields must match the file encoding. But if the database already has data and you don’t want to rebuild it, modifying the encoding via commands is a good choice. Below is the fix. I’ve tried modifying the character … in my.ini …

PHP Session Handling Across Domains and Servers

Cross-Domain and Cross-Server Session Solutions in PHP:
After researching online, I found that except for ASP.NET, all session persistence relies on the session ID. Opinions vary on where to store sessions, with the main options being: shared files, databases, and memcache. Therefore, the core issue revolves around the session i …

Subdomain Session Sharing Solutions

1. Use a cookie to store the session_id(); Example: PHP code in Domain One: <?phpsession_start();setcookie("session_id",session_id(),time()+3600*24*365*10,"/",".session.com"); $_SESSION['user_name'] = 'Liangshan …

How to Recover MySQL Database Using mysqlbinlog

What should you do if you accidentally perform a wrong operation on a database and don鈥檛 have a timely backup? This is probably a common problem that many coders often encounter.
Today, I accidentally deleted a database, but the last backup was from a week ago. The only way to resolve this is through mysqlbinl …