MYSQL Useful Commands


systemctl restart mysqld.service
/etc/init.d/mysql restart


systemctl stop mysqld.service
/etc/init.d/mysql stop

systemctl start mysqld.service
/etc/init.d/mysql start

Commands after logged in:

Create database:

create database [databasename];

Show databases:

show databases;

Switch to a db:

use [db name];

Show tables of a db:

show tables;

Delete a db:

drop database [database name];

Delete a table:

drop table [table name];

Show all data in a table:

SELECT * FROM [table name];
Error log:
tail -f /var/lib/mysql/

That’s all folks, see you  later!

4 thoughts on “MYSQL Useful Commands

  1. Ultimately, just after the computer software scan is accomplished, we are able to briefly browse by way of the information list. Soon after you locate your lost information, pick them and click “Recover” within the bottom correct corner of your computer software interface.

Leave a Reply

Your email address will not be published. Required fields are marked *