Restart Start Stop MySQL Server from Command Line, macOS, Linux

Mysql Mariadb Restart Start Stop

To restart, start or stop MySQL or mariadb database servers from the command line, type the following at the shell prompt… On Linux start/stop/restart from the command line: /etc/init.d/mysqld start /etc/init.d/mysqld stop /etc/init.d/mysqld restart Some Linux flavors offer the service command too service mysqld start service mysqld stop service mysqld restart or service mysql start…

Read More

Import / Export a mysql database on the command line

Remove Mysql Databse Macos

To export a mysql database (as a dump) from the command line run: mysqldump database_name > database_exportname.sql To import a mysql database dump into a database: mysql database_name < database_exportname.sql To export all databases into a dump: mysqldump –all-databases > all_databases_export.sql To import one of these mysql databases from the dump into a database: mysql…

Read More

Change and Update WordPress URLS in Database When Site is Moved to new Host

After migrating a WordPress site to a new URL either to a live production site or a testing development server, the new URL strings in the MySQL database need to be changed and updated in the various MySQL database tables. This method just uses the whole MySQL database rather than a WordPress export/import from within and…

Read More

Import a mysql database into macOS via Terminal

Remove Mysql Databse Macos

Import a mysql/mariadb  database into macOS via the command line I have found that phpmydmin on the Mac has issues with the max upload file size limit and changing the value in php.ini doesn’t always do the trick. With mysql already installed a quick trip to the terminal will sort this out. Create the database…

Read More