Mysqld_safe then launches OSX Lion kiosks

I am running mysql 5.5.22 on OSX Lion. My problem is that mysqld_safe starts and stops at the starting position.

I typed this command: mysqld_safe

120327 05:33:57 mysqld_safe Logging to '/usr/local/mysql/data/The-BatMobile.local.err'. 120327 05:33:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data 

Mysqld_safe lingers on this last line of code for 25 minutes. Does anyone have an idea? The Google searches that I performed revealed some problems with Lion, but nothing about this particular problem.

Change //

After reading the mysql error log, I found that mysqldsafe might already be running with the previous line of code indicated:

 120327 05:33:57 mysqld_safe Logging to '/usr/local/mysql/data/The-BatMobile.local.err'. 120327 05:33:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data 

Is my assumption correct?

Here is the error log:

 21 120327 11:21:58 mysqld_safe mysqld from pid file /usr/local/mysql/data/the- batmobile.pid ended 22 120327 11:23:06 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data 23 120327 11:23:06 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive 24 120327 11:23:06 [Note] Plugin 'FEDERATED' is disabled. 25 120327 11:23:06 InnoDB: The InnoDB memory heap is disabled 26 120327 11:23:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins 27 120327 11:23:06 InnoDB: Compressed tables use zlib 1.2.3 28 120327 11:23:06 InnoDB: Initializing buffer pool, size = 128.0M 29 120327 11:23:06 InnoDB: Completed initialization of buffer pool 30 120327 11:23:06 InnoDB: highest supported file format is Barracuda. 31 120327 11:23:06 InnoDB: Waiting for the background threads to start 32 120327 11:23:07 InnoDB: 1.1.8 started; log sequence number 1595675 33 120327 11:23:07 [Note] Event Scheduler: Loaded 0 events 34 120327 11:23:07 [Note] /usr/local/mysql/bin/mysqld: ready for connections. 35 Version: '5.5.22' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL) 
+4
source share
2 answers

I think I found the answer to my question!

When the mysqld_safe command is executed and no other line appears after starting "Starting the daemon with dbs from / usr / local / mysql / data", it works!

 120327 05:33:57 mysqld_safe Logging to '/usr/local/mysql/data/The-BatMobile.local.err'. 120327 05:33:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data 

I did two tests to confirm this:

Test 1: mysqld_safe off

I killed the mysqld_safe process and tried to log in using "mysql -u root -p" and it gave me this error.

 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2): 

Test 2: mysqld_safe: on

It works! I used "mysql -u root -p" to log in and the mysql terminal appeared!

+4
source

The correct answer is what mysqld_safe should look like. Glad you understood this before losing your mind!

To stop mysql without having to manually do it, you can use sudo mysqladmin shutdown .

To start mysql without using a useless term window, you can use sudo mysqld_safe & This makes mysqld work in the background, and you can still use the term window. However, if you close the window, it will also kill mysqld.

You should be able to make mysqld immune to dying when the window closes by running nohup sudo mysqld_safe & , but this does not work for me (it starts in the background, but dies anyway when the window closes). I do not know why.

+2
source

Source: https://habr.com/ru/post/1403658/


All Articles