Install MySQL
Centos 7 comes with MariaDB instead of MySQL. MariaDb is an open source equivalent to MySQL.
So you need to add the MySQL DB manual:
Run
# sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Then you can install MySQL like you normally do.
# yum install mysql mysql-server
# systemctl start mysqld
# /usr/bin/mysql_secure_installation
Give it a new root password, for example (en2015!)
Press yes on all messages and the enable the service:
# systemctl enable mysqld.service
Change MySQL default character set to UTF-8
We need to edit my.cnf to support utf8 for Greek Characters
# vi /etc/my.cnf
The configuration file ('/etc/my.cnf' for example) should look like that:
[mysqld]
character-set-server = utf8
skip-character-set-client-handshake
When you save the file you need to restart the service
# systemctl restart mysqld
Now try to logon to MySQL
# mysql -u root –p
Type: mysql> status
And,check them like this
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
Create a user “nike” and a db “diskpart” for Server
# mysql -u root –p
Enter the root password (en2015!)
mysql> CREATE DATABASE diskpart character set utf8;
mysql> CREATE USER 'nike@localhost' IDENTIFIED BY 'en2015!';
mysql> GRANT ALL PRIVILEGES ON diskpart.* TO nike@localhost IDENTIFIED BY 'en2015!';
mysql> FLUSH PRIVILEGES;
mysql> Exit
Thats it......
Centos 7 comes with MariaDB instead of MySQL. MariaDb is an open source equivalent to MySQL.
So you need to add the MySQL DB manual:
Run
# sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Then you can install MySQL like you normally do.
# yum install mysql mysql-server
# systemctl start mysqld
# /usr/bin/mysql_secure_installation
Give it a new root password, for example (en2015!)
Press yes on all messages and the enable the service:
# systemctl enable mysqld.service
Change MySQL default character set to UTF-8
We need to edit my.cnf to support utf8 for Greek Characters
# vi /etc/my.cnf
The configuration file ('/etc/my.cnf' for example) should look like that:
[mysqld]
character-set-server = utf8
skip-character-set-client-handshake
When you save the file you need to restart the service
# systemctl restart mysqld
Now try to logon to MySQL
# mysql -u root –p
Type: mysql> status
And,check them like this
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
Create a user “nike” and a db “diskpart” for Server
# mysql -u root –p
Enter the root password (en2015!)
mysql> CREATE DATABASE diskpart character set utf8;
mysql> CREATE USER 'nike@localhost' IDENTIFIED BY 'en2015!';
mysql> GRANT ALL PRIVILEGES ON diskpart.* TO nike@localhost IDENTIFIED BY 'en2015!';
mysql> FLUSH PRIVILEGES;
mysql> Exit
Thats it......
