Linux remote deployment of MySQL database, for your reference, the specific content is as follows 1.0 Install the 1.1 Copy the mysql compressed package to the /usr/local file directory and decompress it: 1.2 Unzip the imported MySQL compressed package and enter: 1.3 After the decompression is complete, rename the decompressed file to mysql. Enter: 1.4 Uninstall the built-in MySQL in Linux system (built-in plug-ins are incomplete) View: If not proceed directly to the next step Uninstall: Enter: If the uninstallation fails, it indicates that the associated files are not installed. Enter the command: 1.5 Create user groups and users Create a user group: 1.6 Assigning exclusive user groups and users to mysql users First create a data folder and go to the mysql file directory to create a data folder cd /usr/local/mysql mkdir data 1.7 Specifying Users and User Groups cd /usr/local/ chown -R mysql mysql/ chgrp -R mysql mysql/ 1.8 Initialize mysql cd /usr/local/mysql/bin yum -y install numactl ./mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --lc_messages_dir=/usr/local/mysql/share --lc_messages=en_US Remember the generated mysql temporary password If you forget the password or want to reinitialize, you can first delete the files in the mysql/data directory and then execute the initialization command. 1.9 Configure my.cnf Enter: [mysqld] basedir=/usr/local/mysql/ datadir=/usr/local/mysql/data/ Copy this information into the configuration file and press i to edit it After editing, press the ESC key and then press Shift + ; Enter wq to save and exit 2.0 Starting MySQL cd /usr/local/mysql/bin ./mysqld_safe --user=mysql & 2.1 Set the auto-start function cd /usr/local/mysql/support-files/ cp mysql.server /etc/init.d/mysql vi /etc/init.d/mysql Add the mysql directory as shown below The following figure shows the save and exit after adding Authorization: 2.2 Start the service Start the service: service Stop Restart the service: View the service: 2.3 Log in to MySQL Enter the bin directory: Modify password, login authorization, authorization effective command Change password: Authorization takes effect: 2.4 Use Navicat to test Windows connection to Linux system mysql database If it says link failed, don't panic! The firewall must not open port 3306 to set 2.5 Open the firewall configuration file Enter the firewall configuration file Add a line: Save and exit Then restart the firewall Then test the connection: It will show that the connection is successful and you can use it freely. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to implement dual-machine master and backup with Nginx+Keepalived
>>: Example of Vue's implementation of the underlying code for simulating responsive principles
Original URL: http://segmentfault.com/blog/ciaocc/...
Knowing the IP address of a device is important w...
Preface This is a new function I came across rece...
This article example shares the specific code for...
CSS Layout - position Property The position attri...
1. Download MySQL 1.1 Download address https://do...
1. Download and decompress MySQL 8.0.20 Download ...
This article shares the specific code for JavaScr...
Introduction to Debian Debian in a broad sense re...
In the previous sections, we discussed aspects of ...
Deploy nginx with docker, it's so simple Just...
In addition to setting regulations for various ta...
Preface The previous article installed Hadoop, an...
Table of contents js deep copy Data storage metho...
Map tags must appear in pairs, i.e. <map> .....