MySQL won’t start

Getting errors when trying to start the MySQL service such as: 161220  9:16:06 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘’ doesn’t exist You can initialize the data directory manually using: mysql_install_db –user=mysql –basedir=/usr/ –ldata=/var/lib/mysql/ This will remove any passwords for the root user so setup/update the password using: If you have… read more »

MySQL basic commands

All commands must end in ; to be accepted, the most commonly needed commands are: DROP DATABASES (dbname); SHOW DATABASES; Managing an individual db: use [db name]; show tables; Full list can be found here  

Access MySQL

To login in terminal: mysql -u root -p (nameofdatabase*) Breakdown: mysql The process being started -u root Specifies root user -p User requires a password *Name of database is not required, only if you wish to login directly to a db

PHPMyAdmin Additional Functions

  PHPMyAdmin database is automatically installed with PHPMyAdmin and is used to link the PMA user to additional functions. create_tables.sql is supplied in the original PHPMyAdmin package, but re-installing the package will not re-add it if database if dropped. The installation package needs to be extracted, the database file is in the root, once found… read more »

PhpMyAdmin default database

A copy of this file can be found here — ——————————————————– — SQL Commands to set up the pmadb as described in the documentation. — — This file is meant for use with MySQL 5 and above! — — This script expects the user pma to already be existing. If we would put a –… read more »