First of all, to reinstall the system, poor, I did not know at first, in the case of the system for windows server 2008, I reinstalled the system into win7, for a never For those who reinstalled the system, it was awkward. It took a day to finally install win7. When I saw the win7 boot interface, my heart was excited. Unfortunately, I didn’t feel excited, I found that I couldn’t access the Internet. After a long time, ha, finally can also go online, but the result was told to install linux system, and it is still suse, and how to install all kinds of information from the Internet, this time it took a long time to install, the result is after booting I still found that I couldn't get online, crashed--, but I met a big god and helped me with all kinds of networks. Finally, the network environment is good, I can go online, and I can start to build a server. . . .
The following is the personal installation mysql process Oh
1. First download mysql,
Anyway, I installed 5.7 unsuccessful, can only choose the version of 5.6
2. Check if it is installed, grep's -i option means ignore case when matching rpm -qa|
Grep -i mysql If the library file is already installed, it should be uninstalled first. . . .
3. Add mysql user group and mysql user, the command is as follows:
groupadd mysqluseradd -r -g mysql mysql4. Unzip the Mysql installation package to its directory, the command is as follows :
tar -zxvf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
Then copy the extracted directory to the system's local software directory “/usr/Local/”, the command is as follows:
cp -rf mysql-5.6.36-linux-glibc2.5-x86_64 /usr/local/mysql
5. Enter the directory where Mysql software is installed. And modify the current directory owner to be the newly created mysql user, that is, change the group and user to which it belongs.
cd /usr/local/mysql
chown -R mysql:mysql ./
chgrp -R mysql:mysql ./
6. Copy The default global startup parameter configuration file is to the /etc directory. The command is as follows:
cp ./support-files/my-default.cnf /etc/my.cnf
7. Execute the installation package Bring the script, install the database
./scripts/mysql_install_db --user=mysql
8. Modify the current directory owner as the root user, that is, all the data/directories except the mysql/directory The file is changed back to the root user. The mysql user only needs to be the owner of all files in the mysql/data/directory.
chown -R root:root ./
chown -R mysql:mysql data
9. Add the mysqld service to the boot self-startup.
First you need to copy the scripts/mysql.server service script to /etc/init.d/and rename it to mysqld.
cp support-files/mysql.server /etc/init.d/mysqld
Add the mysqld service to the self-starting service by using the chkconfig command.
chkconfig --add mysqld
See if the addition is successful chkconfig --list mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
10. Restart the system and mysqld will start automatically.
Check if it starts
netstat -anp| Grep mysqld
tcp 0 00.0.0.0:3306 0.0.0.0:* LISTEN 2365/mysqld unix 2 [ ACC ] STREAM LISTENING 14396 2365/mysqld /tmp/mysql.sock
If you don't want to re Start up, you can start it manually.
service mysqld start
Starting MySQL..SUCCESS!
Check if the Mysql process has started, ps -ef| Grep mysqld
shows the result as shown below, indicating that the Mysql database is successfully started:
root 1708 1 0 08:21 ? 00:00:00 /bin/sh /usr/local/mysql /bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/linux-c8tk.pid mysql 1850 1708 0 08:21 ? 00:00:17 /Usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user =mysql --log-error=/usr/local/mysql/data/linux-c8tk.err --pid-file=/usr/local/mysql/data/linux-c8tk.pid adminer 6231 6207 0 16:05 pts /0 00:00:00 grep --color=auto mysql 11. Modify the password of the root user of the Mysql database. The initial password of the root is empty by default. In addition to the mysql system, use mysqladmin
./bin /mysqladmin -u root password '(fill in the password here) root'
12. Put the mysql client in the default path and run #ln -s /usr/local/mysql/bin/mysql /usr/Local/bin/mysql
13.Enter mysql
mysql -uroot -proot
The result is as follows:
Welcome to theMySQLmonitor. Co Mmands end with ; or \\g. Your MySQLconnection idis 3 Serverversion: 5.5.29-log MySQL Community Server (GPL) Copyright (c)2000, 2012,Oracle and/or its affiliates. All rights reserved. Oracle is aregisteredtrademark of Oracle Corporation Type 'help;' or'\\h' forhelp. Type '\\c' to clear the current input statement. mysql>
flush privileges; //Refresh MySQL system permissions related table -
flush hosts; //clear the host cache table
14. Open the MySQL database remote access permissions
link mysql, run Mysql -uroot -proot switch database use mysql query mysql user information SELECT User, Password, Host From user;
Open any host can link mysql server, remote access authorization:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'Administrator'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
Modifications take effect flush privileges;
15. Into the database
Import the database 1, first open the database mysql> create database abc; 2, import the database //have been operated Method 1: (1) select the database mysql> use abc; (2) set the database encoding mysql> ;set names utf8; (3) import data (note the path of the sql file) mysql> source /home/abc/abc.sql; Method two: mysql -u username -p password database name < database name.sql #mysql -uabc_f -p abc < abc.sql It is recommended to use the second method to import.
Ubuntus notebook came to a LAN, plugged in the Internet cable, the network cable indicator l
First, thread creation header file #include <pthread.h> function declaration int pth
There are 7 startup levels in Linux: #0 - halt (Do NOT set initdefault to this)# 1 - Single
Preparation before installation 1. kail linux 2.0 download (multiple versions of ISO) Downl
Linux remote synchronization data tool rsync
8 tips make you a superb Linux end user
Linux partial command explanation (what means the command abbreviation means)
What are the common commands for Linux?
Linux system virtual memory space
Dynamic routing network infrastructure of linux
Linux resource limit level summary
Vim repair, telnet installation start, linux update software source
Win 7 system to view virtual memory occupied by software or system components
Audio service is not running? Master's recipe is all done
How to reinstall Windows7 system to ensure that data is not lost
Use the registry to open Win10 night mode
Tencent video how to download video graphic tutorial
Win10 Preview: Increased System Compression in Disk Cleanup
Five Windows 7 suspended animation scenarios and processing methods
Win10 preview version 10049 login desktop blue screen problem solving method