59519751 发表于 2018-8-28 10:50:42

shell脚本一键安装MySQL5.5

# sh mysql_script.sh  
WARNING: The host 'db_server' could not be looked up with resolveip.
  
This probably means that your libc libraries are not 100 % compatible
  
with this binary MySQL version. The MySQL daemon, mysqld, should work
  
normally with the exception that host name resolving will not work.
  
This means that you should use IP addresses instead of hostnames
  
when specifying MySQL privileges !
  
Installing MySQL system tables...
  
OK
  
Filling help tables...
  
OK
  

  
To start mysqld at boot time you have to copy
  
support-files/mysql.server to the right place for your system
  

  
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  
To do so, start the server, then issue the following commands:
  

  
./bin/mysqladmin -u root password 'new-password'
  
./bin/mysqladmin -u root -h db_server password 'new-password'
  

  
Alternatively you can run:
  
./bin/mysql_secure_installation
  

  
which will also give you the option of removing the test
  
databases and anonymous user created by default.This is
  
strongly recommended for production servers.
  

  
See the manual for more instructions.
  

  
You can start the MySQL daemon with:
  
cd . ; ./bin/mysqld_safe &
  

  
You can test the MySQL daemon with mysql-test-run.pl
  
cd ./mysql-test ; perl mysql-test-run.pl
  

  
Please report any problems with the ./bin/mysqlbug script!
  

  
160112 23:30:48 mysqld_safe Logging to '/var/lib/mysql/db_server.err'.
  
160112 23:30:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
  
+------------+
  
| version()|
  
+------------+
  
| 5.5.32-log |
  
+------------+
  
MySQL-5.5 install Success!
  
# ps -ef | grep mysql
  
root      1245   10 23:30 pts/0    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/var/lib/mysql/my.cnf
  
mysql   152412455 23:30 pts/0    00:00:01 /usr/local/mysql/bin/mysqld --defaults-file=/var/lib/mysql/my.cnf --basedir=/usr/local/mysql --datadir=/var/lib/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/var/lib/mysql/db_server.err --pid-file=/var/lib/mysql/db_server.pid --socket=/tmp/mysql.sock --port=3306
  
root      154511180 23:31 pts/0    00:00:00 grep mysql


页: [1]
查看完整版本: shell脚本一键安装MySQL5.5