Install Mysql Server And Configure In Centos
MySQL is a Relational Database Management System (RDBMS) that runs as a server providing multi-user access to a number of databases.
# yum install mysql.x86_64 mysql-devel.x86_64 mysql-server.x86_64
# chkconfig mysqld on
# service mysqld start
# mysql_secure_installation
# chkconfig mysqld on
# service mysqld start
# mysql_secure_installation
Enter current password for root (enter for none):
Change the root password? [Y/n]
Remove anonymous users? [Y/n] // Y
Disallow root login remotely? [Y/n] // Y
Remove test database and access to it? [Y/n] // Y
Reload privilege tables now? [Y/n] // Y
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
You can also use the given below alternate method
# mysqladmin -u root password new-password // For creating root passoword
OR
# /usr/bin/mysqladmin -u root password password
OR
# /usr/bin/mysqladmin -u root password password
For listing all Databases :-
# mysqlshow -p
Create database from the terminal
# mysql -uroot -p -e"create database DB-name"
Drop database from the terminal
# mysql -uroot -p -e"drop database DB-name"
For taking database dump
# mysqldump -uroot -p --add-locks=false DB-name > DB-name.sql
Install Mysql Server And Configure In Centos
Reviewed by vivek sathisan
on
13:29
Rating:

No comments: