Check out this article: https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
Category: MySQL
-
Install MySQL on Mac with Homebrew
Uninstall first if needed
brew remove mysql brew cleanup launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist sudo rm -rf /usr/local/var/mysqlInstall
brew install mysql mysqld --initialize --explicit_defaults_for_timestamp mysql.server start # no sudo!Another good guide here
Useful commands
brew services start mysql brew services stop mysql brew services restart mysql -
Install Nginx, PHP, MySQL on Mac
A very good guide here
-
Get last inserted row ID from WordPress database using
$lastid = $wpdb->insert_id;added after the insert query
Source: https://stackoverflow.com/questions/1576018/how-to-get-last-inserted-row-id-from-wordpress-database
-
Fix XAMPP MySQL server shutdown unexpectedly
IMPORTANT: do NOT delete
ibdata1file. You could destroy all your databases.Instead, first try using the MySQL backup folder which is included with XAMPP. So do next steps:
- Rename folder
mysql/datatomysql/data_old - Make a copy of
mysql/backupfolder and name it asmysql/data - Copy all your database folders from
mysql/data_oldintomysql/data(exceptmysql,performance_schema, andphpmyadminfolders) - Copy
mysql/data_old/ibdata1file intomysql/datafolder - Start MySQL from XAMPP control panel
Source: https://stackoverflow.com/questions/18022809/how-to-solve-error-mysql-shutdown-unexpectedly
- Rename folder