MySQL

/Tag:MySQL

Upgrade MySQL from 5.5 to 5.7 on Debian

In a few months ago, I tried to Upgrade MySQL from 5.5 to 5.7 on CentOS. Although the upgrade process is successful, it is a little bit terrible experience because all data may be removed. Recently, I have got another request to the same upgrade but in Debian. The process is definitely much easier. I [...]

By | July 19th, 2016|IT Knowledge Base|0 Comments

Upgrade MySQL from 5.5 to 5.7 on CentOS

I have got a task to migrate a system from a CentOS server and another CentOS server. When I imported the MySQL database to the server, I have got the following error: (SQL Error: 1294 SQL State: HY000) - Invalid ON UPDATE clause for 'column_name' field Oh.... DATETIME can use CURRENT_TIMESTAMP on update starting from [...]

By | April 29th, 2016|IT Knowledge Base|0 Comments

How to solve SQLSTATE[HY000] [2002] No such file or directory

Sometimes a MySQL PDO error message below would be got SQLSTATE[HY000] [2002] No such file or directory The error message may be shown due to the line below $db = new PDO('mysql:host=localhost;dbname=db_name;charset=utf8', 'username', 'password'); What's going on? Try to change "localhost" to "127.0.0.1" $db = new PDO('mysql:host=127.0.0.1;dbname=db_name;charset=utf8', 'username', 'password');   The error message should then [...]

By | February 20th, 2015|IT Knowledge Base|0 Comments

Setup a new CentOS (Apache, PHP, MySQL, phpMyAdmin, Sendmail)

After the installation of a new CentOS platform, you can follow the steps in this article to setup some important configurations and install some important services. e.g. resetting the root password, set the server local time, install apache, mysql, php, php-mysql, sendmail services and so on. […]

By | May 7th, 2014|IT Knowledge Base|0 Comments

Move a MySQL Database to New Linux Server

I have received a request to move a mysql database from the current database to a new server. The easiest way is to use phpMyAdmin to export the database. Or we can simply use the command mysqldump. Howerver, I do not have phpMyAdmin access. And I get the following error when using the command "mysqldump". mysqldump: Got [...]

By | May 7th, 2014|IT Knowledge Base|0 Comments

MySQL Command to Create new user and database

If you have installed phpMyAdmin in your server, you can easily use the function to create new user and database by checking the checkbox "Create database with same name and grant all privileges". It will set the username of the new user as the same as the database name. But your server may be hacked through phpMyAdmin if [...]

By | May 7th, 2014|IT Knowledge Base|0 Comments