In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Xiaobian to share with you how to install the database management system MariaDB under Linux, I believe most people still do not know how, so share this article for everyone's reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!
MariaDB database management system is a branch of MySQL, mainly maintained by the open source community, using the GPL license MariaDB is designed to be fully compatible with MySQL, including API and command line, making it an easy replacement for MySQL.
install yum install yum install mariadb-server mariadb -y
view version
[root@mysqldb ~]# rpm -q mariadb-server mariadbmariadb-server-5.5.60-1.el7_5.x86_64mariadb-5.5.60-1.el7_5.x86_64 Set boot autoboot [root@mysqldb ~]# systemctl enable mariadbCreated symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. Configure security scripts
After installation, the root password is empty by default, so you need to configure the security control program.
Mariadb needs to be started before configuration
systemctl start mariadb
Initiate security configuration program
[root@mysqldb ~]# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none): #Password is blank, get back in the car. OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.Set root password? [Y/n] y #New password:Re-enter new password:Password updated successfully! Reloading privilege tables..... Success! By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] y #Remove anonymous users... Success! Normally, root should only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] n #Allow root to log in remotely to the database... skipping.By default, MariaDB comes with a database named 'test' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.Remove test database and access to it? [Y/n] n #Do not delete the test database, the latter test can be used... skipping.Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] y #overloaded authorization table... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDBinstallation should now be secure.Thanks for using MariaDB!
According to the above tips for configuration, roughly OK.
Login database
The password has been set above, so you can't log in to the database only through mysql, and you must add the user and password.
[root@mysqldb ~]# mysql -u root -pEnter password: #Output password, do not recommend putting it after-p to show it in plain text Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 9Server version: 5.5.60-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> Basic commands
view database
show databases;
enter the database
use mysql;
View list of tables
show tables;
View table structure
desc user;
View Version:
MariaDB [mysql]> select version();+----------------+| version() |+----------------+| 5.5.60-MariaDB |+-----------------+1 row in set (0.00 sec) directory structure directory description/var/lib/mysql data file storage path, you can customize/etc/my.cnfmysql configuration file address/usr/lib64/mysql library file path/usr/bin/mysql*mysql binary executable file path/etc/rc.d/init.d/mysqldmysql service management script address/var/log/mysqld.logmysql log file address
The above is "How to install MariaDB database management system under Linux" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.