Articles in the MySQL Category
MySQL »
For example, if you have database called db_name that you want to copy to new_db_name, you would first create a “database dump” file using:
mysqldump -u db_name -p db_name > a.dump
It will prompt for db password enter it here.
Then create the new database via web hosting control panel
mysql -u new_db_name -p new_db_name < a.dump
It will prompt for db password enter it here
Featured, MySQL, Wordpress »
This web-based tool written in PHP makes it easy to search and replace text strings in a MySQL database.
Usually, I develop WordPress sites on a local development server and, when they are ready to launch, I move them to a live web server.
MySQL Search & Replace
For database-driven sites created with content management systems like WordPress, Drupal, and Joomla, this means moving any custom themes and plugins, and it often entails exporting data from the development server’s database and copying it to the live web server.
With small databases, your content management …
MySQL, Solved Issues »
Follow the below code to import mysql database using command line.
mysql -uUSERNAME -pDATABASE < DATABASE_FILE.SQL
Format: mysql -uroot -ppasword -hlocalhost database-name < sql_dump_file_name.sql
Correct Example: mysql -uroot -palakmalak -hlocalhost oca < cerb4oca.sql
Note: Do not go to mysql console. Just go to the directory where your backup file resides.
Note: Do not use -u space username like -u root ( this will not work ) use -uroot -ppassword -hlocalhost
Wrong Example: mysql -u root -p abc123 localhost < mytest.sql
where root is USERNAME of MySQL, abc123 is DATABASE of MyQL and mytest.sql is …
