sudo /etc/init.d/mysql restart
Tag Archives: MySQL
Command to stop MySQL – Ubuntu Linux
sudo /etc/init.d/mysql stop
Command to start MySQL – Ubuntu Linux
sudo /etc/init.d/mysql start
Command to install MySQL – Ubuntu Linux
sudo apt-get install mysql-server
Linux command to export a database – MySQL
mysqldump -u USERNAME -p DATABASE-NAME > test.sql
Linux command to import a database – MySQL
mysql -u USERNAME -p -h localhost DATABSENAME < sql-file-name.sql
MySQL command to modify password – Linux
mysqladmin -u root -p password Newspassword
MySQL command to show list of tables – Linux
show tables;
MySQL command to show list of databases – Linux
show databases;
How to connect to MySQL Database server using command line
mysql -h localhost -u root -ppassword