1.Create mariadb.repo under /etc/yum.repos.d/with the following content:
[[email protected] etc] $cd /etc/yum.repos.d [[email protected] yum.repos.d] $vi mariadb.repo #mariadb 10.0 centos repository list-created 2013-08-23 13:08 utc #http://mariadb.org/mariadb/repositories/ [mariadb] name=mariadb baseurl=http://yum.mariadb.org/10.0/centos6-amd64 gpgkey=https://yum.mariadb.org/rpm-gpg-key-mariadb gpgcheck=1
For other operating systems,Information can be found here.
2.Install mariadb using yum
[[email protected] yum.repos.d] $sudo yum -y install mariadb-client mariadb-server mariadb-devel
3. Start the database
[[email protected] yum.repos.d] $sudo service mysql start
4, modify the root password
[[email protected] yum.repos.d] $mysqladmin -u root password "passwd"
5. Configure remote access,mariadb for security reasons,The IP is bound (127.0.0.1) by default.
[[email protected] yum.repos.d] $mysql -u root -p enter password: welcome to the mariadb monitor. commands end with;or \ g. your mariadb connection id is 4 server version:10.0.4-mariadb mariadb server copyright (c) 2000, 2013, oracle, monty program ab and others. type "help;" or "\ h" for help. type "\ c" to clear the current input statement. mariadb [(none)]>grant all privileges on *. * to "root"@"%" identified by "passwd" with grant option; mariadb [(none)]>flush privileges;
The "%" in the first sentence means that any host can remotely log in to the server and access it.If i want to restrict access to only one machine,Replace it with the corresponding IP, such as:
The second sentence indicates that permission data is reloaded from the grant table of the mysql database.Because mysql puts permissions in the cache, it needs to be reloaded after making changes.
6. If the system's firewall is open (or behind a hardware firewall or nat), you must release the TCP port used by MySQL, which is usually 3306.
After logging in with the root account,Add [lower_case_table_names=1] after [mysqld] in /etc/my.cnf and restart the mysql service. At this time, the setting is successful:the table name is not case sensitive;
The lower_case_table_names parameter is explained in detail:
Where 0:case sensitive,1:not case sensitive
- Detailed steps to build LNMP environment using yum in CentOS 65
- Centos7 tutorial for installing lnmp using yum (linux + nginx + php71 + mysql57)
- Completely delete Mysql in Centos (rpm, yum installation)
- centos yum install mongodb and php extension
- yum command to install php7 and related extensions
- Tutorial for installing MongoDB 26 using yum on CentOS 65
- CentOS detailed explanation if yum update source is changed
- Analysis of building yum in LNMP environment
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- dart - flutter: the instance member'stars' can't be accessed in an initializer error