[root@LingShu mysql]#
./bin/mysql_install_db --user=mysql
Installing MySQL system tables...
OK
Filling help tables...
OK
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
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:
To do so, start the server, then issue the following commands:
/document/mysql/bin/mysqladmin -u root password 'new-password'
/document/mysql/bin/mysqladmin -u root -h LingShu.cn password 'new-password'
/document/mysql/bin/mysqladmin -u root -h LingShu.cn password 'new-password'
Alternatively you can run:
/document/mysql/bin/mysql_secure_installation
/document/mysql/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.
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 /document/mysql ; /document/mysql/bin/mysqld_safe &
cd /document/mysql ; /document/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /document/mysql/mysql-test ; perl mysql-test-run.pl
cd /document/mysql/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /document/mysql/bin/mysqlbug script!
[root@LingShu mysql]# ls
bin docs include lib libexec mysql-test share sql-bench
[root@LingShu mysql]# ./bin/mysql_install_db --datadir=./var --user=mysql #指定目录
Installing MySQL system tables...
OK
Filling help tables...
OK
bin docs include lib libexec mysql-test share sql-bench
[root@LingShu mysql]# ./bin/mysql_install_db --datadir=./var --user=mysql #指定目录
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
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:
To do so, start the server, then issue the following commands:
/document/mysql/bin/mysqladmin -u root password 'new-password'
/document/mysql/bin/mysqladmin -u root -h LingShu.cn password 'new-password'
/document/mysql/bin/mysqladmin -u root -h LingShu.cn password 'new-password'
Alternatively you can run:
/document/mysql/bin/mysql_secure_installation
/document/mysql/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.
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 /document/mysql ; /document/mysql/bin/mysqld_safe &
cd /document/mysql ; /document/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /document/mysql/mysql-test ; perl mysql-test-run.pl
cd /document/mysql/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /document/mysql/bin/mysqlbug script!
[root@LingShu mysql]# ls
bin docs include lib libexec mysql-test share sql-bench var #生成了var目录
[root@LingShu mysql]# ll
总用量 8
drwxr-xr-x 2 mysql mysql 4096 4月 21 22:33 bin
drwxr-xr-x 2 mysql mysql 41 4月 21 22:32 docs
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 include
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 lib
drwxr-xr-x 2 mysql mysql 40 4月 21 22:33 libexec
drwxr-xr-x 10 mysql mysql 218 4月 21 22:33 mysql-test
drwxr-xr-x 5 mysql mysql 45 4月 21 22:33 share
drwxr-xr-x 5 mysql mysql 4096 4月 21 22:33 sql-bench
drwx------ 4 mysql root 31 4月 21 22:55 var
[root@LingShu mysql]# chown mysql:mysql var/ #更改属主属组
[root@LingShu mysql]# ll
总用量 8
drwxr-xr-x 2 mysql mysql 4096 4月 21 22:33 bin
drwxr-xr-x 2 mysql mysql 41 4月 21 22:32 docs
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 include
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 lib
drwxr-xr-x 2 mysql mysql 40 4月 21 22:33 libexec
drwxr-xr-x 10 mysql mysql 218 4月 21 22:33 mysql-test
drwxr-xr-x 5 mysql mysql 45 4月 21 22:33 share
drwxr-xr-x 5 mysql mysql 4096 4月 21 22:33 sql-bench
drwx------ 4 mysql mysql 31 4月 21 22:55 var
[root@LingShu mysql]# ./bin/mysqld_safe --user=mysql& #启动
[1] 66265
[root@LingShu mysql]# 180421 22:57:35 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
touch: 无法创建"/var/log/mariadb/mariadb.log": 没有那个文件或目录
chown: 无法访问"/var/log/mariadb/mariadb.log": 没有那个文件或目录
180421 22:57:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
./bin/mysqld_safe:行100: /var/log/mariadb/mariadb.log: 没有那个文件或目录
./bin/mysqld_safe:行137: /var/log/mariadb/mariadb.log: 没有那个文件或目录
180421 22:57:36 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
./bin/mysqld_safe:行100: /var/log/mariadb/mariadb.log: 没有那个文件或目录
bin docs include lib libexec mysql-test share sql-bench var #生成了var目录
[root@LingShu mysql]# ll
总用量 8
drwxr-xr-x 2 mysql mysql 4096 4月 21 22:33 bin
drwxr-xr-x 2 mysql mysql 41 4月 21 22:32 docs
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 include
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 lib
drwxr-xr-x 2 mysql mysql 40 4月 21 22:33 libexec
drwxr-xr-x 10 mysql mysql 218 4月 21 22:33 mysql-test
drwxr-xr-x 5 mysql mysql 45 4月 21 22:33 share
drwxr-xr-x 5 mysql mysql 4096 4月 21 22:33 sql-bench
drwx------ 4 mysql root 31 4月 21 22:55 var
[root@LingShu mysql]# chown mysql:mysql var/ #更改属主属组
[root@LingShu mysql]# ll
总用量 8
drwxr-xr-x 2 mysql mysql 4096 4月 21 22:33 bin
drwxr-xr-x 2 mysql mysql 41 4月 21 22:32 docs
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 include
drwxr-xr-x 3 mysql mysql 19 4月 21 22:32 lib
drwxr-xr-x 2 mysql mysql 40 4月 21 22:33 libexec
drwxr-xr-x 10 mysql mysql 218 4月 21 22:33 mysql-test
drwxr-xr-x 5 mysql mysql 45 4月 21 22:33 share
drwxr-xr-x 5 mysql mysql 4096 4月 21 22:33 sql-bench
drwx------ 4 mysql mysql 31 4月 21 22:55 var
[root@LingShu mysql]# ./bin/mysqld_safe --user=mysql& #启动
[1] 66265
[root@LingShu mysql]# 180421 22:57:35 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
touch: 无法创建"/var/log/mariadb/mariadb.log": 没有那个文件或目录
chown: 无法访问"/var/log/mariadb/mariadb.log": 没有那个文件或目录
180421 22:57:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
./bin/mysqld_safe:行100: /var/log/mariadb/mariadb.log: 没有那个文件或目录
./bin/mysqld_safe:行137: /var/log/mariadb/mariadb.log: 没有那个文件或目录
180421 22:57:36 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
./bin/mysqld_safe:行100: /var/log/mariadb/mariadb.log: 没有那个文件或目录
[1]+ 退出 1 ./bin/mysqld_safe --user=mysql
[root@LingShu mysql]#
[root@LingShu mysql]#
#启动失败,不知道是什么原因。那位大神遇到过???求解答