Once you’ve created a database and named it you cannot rename the database using standard SQL commands such as ALTER, in the same manner as you would rename a table. The way to rename a database is as simple as creating a new, empty database, and then recreating the old database in this new database.
Read the rest of this entry »
Tags: MySql
Posted in MySql | No Comments »
As I was trying to backup my mysql database with the following command:
mysql> mysqldump -uuser -ppass databaseDB > output.sql
(where user is the username, pass is the password, and databaseDB is the database name)
I continued to receive the following error:
ERROR 1064(42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘mysqldump’ at line 1.
After some searching I realized that my syntax was correct, but I was putting the command in the wrong place! The mysqldump command needs to run from the command prompt (for windows), and NOT in the mysql console.
That’s it. Problem solved!
Here is a video that will walk you through basic usage of the mysqldump command:
Tags: MySql, Video
Posted in MySql | 2 Comments »