Installing & Configuring MySQL Server

1. Install mysql mysql-server:

# yum install mysql mysql-devel mysql-server -y

2. Start MySQL server daemon (mysqld):

# chkconfig --level 2345 mysqld on;
service mysqld start

SET A PASSWORD FOR THE MySQL root USER
!
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'vnsysadmin.com'

Alternatively you can run:
# /usr/bin/mysql_secure_installation



3. Login as root database admin to MySQL server:


# mysql -u root -p


mysql> create database dbtest1;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL ON dbtest1.* TO root@localhost
-> ;
Query OK, 0 rows affected (0.01 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| dbtest1 |
| mysql |
+--------------------+
3 rows in set (0.01 sec)

mysql> quit;
Bye
[root@db-test ~]#


#Quick notes 2017.02.24


BÀI VIẾT LIÊN QUAN

Post a Comment

Vui lòng tuân thủ một số quy tắc sau:

» Nội dung phải liên quan tới chủ đề bài viết, không spam.
» Viết bằng tiếng Việt có dấu hoặc tiếng Anh.

Hi vọng các bạn tìm được những kiến thức bổ ích khi tình cờ ghé thăm blog này.