Страница 1 из 1

MySQL on RHEL

Добавлено: 25 ноя 2015, 14:18
Vims
Есть гуру? Надо помосчь.
Cпсб.

Re: MySQL on RHEL

Добавлено: 26 ноя 2015, 05:29
dima
I use to run mysql on Fedora. Now it runs on kubunutu.
My guess is all possible issues already found and solutions provided in the Internet.

Hardware failure is an exception.

Re: MySQL on RHEL

Добавлено: 26 ноя 2015, 08:29
Vims
dima писал(а):I use to run mysql on Fedora. Now it runs on kubunutu.
My guess is all possible issues already found and solutions provided in the Internet.
Hardware failure is an exception.
ну хардваре нормально все крутится. Но что то не могу сделать старт mysqld
ессно гуглил и читал, но пока воз и ныне там.... :(
root@RHEL ~]# mysqld start
2015-11-26T09:12:40.612004Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-11-26T09:12:40.613573Z 0 [Note] mysqld (mysqld 5.7.9) starting as process 12465 ...
2015-11-26T09:12:40.616299Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2015-11-26T09:12:40.616345Z 0 [ERROR] Aborting
2015-11-26T09:12:40.616360Z 0 [Note] Binlog end
2015-11-26T09:12:40.616425Z 0 [Note] mysqld: Shutdown complete

Re: MySQL on RHEL

Добавлено: 26 ноя 2015, 11:57
dima
this is how mysqld running on my host.
I guess deamon downgrade itself to "mysql" account.

Код: Выделить всё

$ ps -ef | grep mysql
mysql      926     1  0 Nov19 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     1285   926  0 Nov19 ?        00:12:49 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
$ 
did mysql ever ran on your box ?


This is how it starts now (from this link http://www.cyberciti.biz/faq/how-to-ins ... nder-rhel/ )
# /sbin/service mysqld restart

Re: MySQL on RHEL

Добавлено: 26 ноя 2015, 12:37
Stanislav
Vims писал(а):
dima писал(а):I use to run mysql on Fedora. Now it runs on kubunutu.
My guess is all possible issues already found and solutions provided in the Internet.
Hardware failure is an exception.
ну хардваре нормально все крутится. Но что то не могу сделать старт mysqld
ессно гуглил и читал, но пока воз и ныне там.... :(
root@RHEL ~]# mysqld start
2015-11-26T09:12:40.612004Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-11-26T09:12:40.613573Z 0 [Note] mysqld (mysqld 5.7.9) starting as process 12465 ...
2015-11-26T09:12:40.616299Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2015-11-26T09:12:40.616345Z 0 [ERROR] Aborting
2015-11-26T09:12:40.616360Z 0 [Note] Binlog end
2015-11-26T09:12:40.616425Z 0 [Note] mysqld: Shutdown complete
service mysqld start

Re: MySQL on RHEL

Добавлено: 26 ноя 2015, 12:52
Vims
Stanislav писал(а):service mysqld start
я тебя ждал :)
делал
[root@RHEL etc]# service mysqld start
Initializing MySQL database: 2015-11-26T13:35:59.792104Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-11-26T13:35:59.794725Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2015-11-26T13:35:59.794774Z 0 [ERROR] Aborting

[FAILED]

Re: MySQL on RHEL

Добавлено: 26 ноя 2015, 13:21
Gadi
Vims писал(а):
Stanislav писал(а):service mysqld start
я тебя ждал :)
делал
[root@RHEL etc]# service mysqld start
Initializing MySQL database: 2015-11-26T13:35:59.792104Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-11-26T13:35:59.794725Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2015-11-26T13:35:59.794774Z 0 [ERROR] Aborting

[FAILED]
хе-хе
The server checks for the existence of the data directory as follows:

If no data directory exists, the server creates it.

If a data directory exists and is not empty (that is, it contains files or subdirectories), the server exits after producing an error message:

[ERROR] --initialize specified but the data directory exists. Aborting.

In this case, remove or rename the data directory and try again.
делал?

Re: MySQL on RHEL

Добавлено: 26 ноя 2015, 15:31
Stanislav
Vims писал(а):
Stanislav писал(а):service mysqld start
я тебя ждал :)
А я ждал деталей :-)
Gadi писал(а): In this case, remove or rename the data directory and try again.
Снеси нахрен все: /var/lib/mysql/* (default datadir), если там пусто - точно datadir можно посмотреть в /etc/my.cnf
После инициализации:
# mysql
> USE mysql;
> DELETE FROM user WHERE user = '';
> FLUSH PRIVILEGES;
> \q
#

Re: MySQL on RHEL

Добавлено: 27 ноя 2015, 13:19
Vims
Stanislav писал(а): Снеси нахрен все: /var/lib/mysql/* (default datadir), если там пусто - точно datadir можно посмотреть в /etc/my.cnf
После инициализации:
# mysql
> USE mysql;
> DELETE FROM user WHERE user = '';
> FLUSH PRIVILEGES;
> \q
#
снес :D
[root@RHEL /]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@RHEL /]#

Re: MySQL on RHEL

Добавлено: 27 ноя 2015, 15:05
Stanislav
Vims писал(а):
Stanislav писал(а): Снеси нахрен все: /var/lib/mysql/* (default datadir), если там пусто - точно datadir можно посмотреть в /etc/my.cnf
После инициализации:
# mysql
> USE mysql;
> DELETE FROM user WHERE user = '';
> FLUSH PRIVILEGES;
> \q
#
снес :D
[root@RHEL /]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@RHEL /]#
После того как снес - надо же стартовать сервер!
service mysqld start
Это и выполняет начальную инициализацию. Там оно тебе напишет про это.

Re: MySQL on RHEL

Добавлено: 30 ноя 2015, 11:07
Stanislav
Да, потом скажи:
# chkconfig mysqld on
Это будет запускать MySQL при каждой перезагрузке сервера :D