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
Table of contents 1. Basic theory 1.1 Transaction...
After going through a lot of hardships, I searched...
The mysql on a server in the computer room had be...
This article shares with you a graphic tutorial o...
Html event list General Events: onClick HTML: Mous...
Before understanding this problem, let's firs...
Table of contents What are hooks? Class Component...
First time using docker to package and deploy ima...
Usage of MySQL memory tables and temporary tables...
Isolation Level: Isolation is more complicated th...
After setting the table width in the page to width...
Table of contents 1. Project construction 2: Dire...
The implementation method is divided into three s...
Table of contents 1. Rendering 2. Bind data and a...
bmi Voyager Pitchfork Ulster Grocer Chow True/Sla...