MySQL Error: Job failed to start
#11
Code:
root@NodeA:~# ls -al /var/run/mysqld/
total 0
drwxr-xr-x  2 mysql root  40 Mar  2 08:54 .
drwxr-xr-x 21 root  root 740 Mar  3 11:55 ..
Code:
root@NodeA:~# egrep -i "*.sock" /etc/mysql/my.cnf
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
Looks like there is no socket file in that directory though it should be there as per my configuration. O.o
Code:
root@NodeA:~# ps aux | egrep -i mysql
root     14955  0.0  0.1   4420   808 pts/0    S+   11:58   0:00 egrep --color=auto -i mysql
Does this means mysql is already running?
service mysql start still giving me Start: Job Failed.

Code:
root@NodeA:/usr/bin# mysqld_safe --skip-grant-table &
[1] 17650
root@NodeA:/usr/bin# 160303 12:26:12 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
160303 12:26:12 mysqld_safe Logging to '/var/log/mysql/error.log'.
160303 12:26:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160303 12:26:12 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

[1]+  Done                    mysqld_safe --skip-grant-table
This is the output I get using "mysqld_safe --skip-grant-table &". I think its not started?
#12
(2016-03-04, 3:28:32 am)Neon Wrote:  Does this means mysql is already running?
service mysql start still giving me Start: Job Failed.

No, this means that MySQL is not running. The process that was found is the process of ps & egrep that you issued before to find out whether MySQL is running or not.
#13
why are you trying to log using both syslog ( which is default for system installed mysql in debian / ubuntu) and direct error log ?

Please always use the standard my.cnf provided with the package and do not put new settings without investigating them first ..

may be you could pastebin your my.cnf and the latest entries in /var/log/mysql/error.log ??
Many thanks to Freevps, Chris (cw1998), The Guy( ID 4810), optimus, GHP and the other  staff members.
#14
After MySQL was givin' me error, I did edit the my.cnf file but I think I undid the edits too. I think this configuration file came with the installation of MySql from webmin.

my.conf: http://pastebin.com/2m9Cb7v5

error log: http://pastebin.com/SWs0kGgP

Maybe, you want to know this:
Code:
root@NodeA:/etc/mysql/conf.d# sudo /etc/init.d/mysql start
df: '/var/lib/mysql/.': No such file or directory
* /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
#15
why do you have two [mysqld_safe] blocks ??
Here is what i have for you. Please replace everything in your my.cnf with this one.
http://pastebin.com/AFuU3TfU

now do this ..
chown -hR mysql:mysql /var/lib/mysql

Now try to start again.. first try to start normally. If unsuccessful , try in safe mode.
sorry for the mistake i had in the commands above.. you need to try using "tables" and not "table". So it will be
"mysqld_safe --skip-grant-tables &"

if it starts, then do what you would. dump and then reinstall fresh if you want. If not, share the latest errors in /var/log/mysql/error.log

NOTE: could you share the contents of the directory
/etc/mysql/conf.d/

it is included in the normal my.cnf file and i dont have anything with me to check .... i think the files there are debian.cnf and may be some other. just forgot it.
Many thanks to Freevps, Chris (cw1998), The Guy( ID 4810), optimus, GHP and the other  staff members.
#16
Code:
root@NodeA:~# ls -al /etc/mysql/conf.d/
total 12
drwxr-xr-x 2 root root 4096 Mar  3 23:12 .
drwxr-xr-x 3 root root 4096 Mar  3 23:11 ..
-rw-r--r-- 1 root root    0 Oct 22 10:38 .keepme
-rw-r--r-- 1 root root   21 Oct 22 10:38 mysqld_safe_syslog.cnf
Okay, I will let you know what happens after trying that configuration file.
#17
wait wait.. i think that config there directs it to syslog.. could i have a peek into that..please pastebin it.

mysqld_safe_syslog.cnf
Many thanks to Freevps, Chris (cw1998), The Guy( ID 4810), optimus, GHP and the other  staff members.
#18
Okay, did put those configs in my file.


Code:
root@NodeA:~# chown -hR mysql:mysql /var/lib/mysql
chown: cannot access ‘/var/lib/mysql’: No such file or directory

root@NodeA:~# cat /var/lib/mysql/
cat: /var/lib/mysql/: No such file or directory
Its showing there is no such directory O.o

Also, mysqld sys log:
Code:
root@NodeA:~# cat /etc/mysql/conf.d/mysqld_safe_syslog.cnf
[mysqld_safe]
syslog
#19
the reason you dont have that folder is cause in this post https://freevps.us/thread-17861-post-200...#pid200705 I told you to copy, but i gave the command with mv and you followed it blindly. There should have been a cp.
"2) copy the sql db folder .. just do a "mv /var/lib/mysql /var/lib/mysqlbkup1" "

anyway.. to remedy that,
cp /var/lib/mysqlbkup1 /var/lib/mysql

now proceed with,
chown -hR mysql:mysql /var/lib/mysql

change the last line in the my.cnf from ## without quotes ##

"!includedir /etc/mysql/conf.d/"
to
"# !includedir /etc/mysql/conf.d/"

Now add this under [mysqld_safe] ### do not add another block.. just add this line within that existing block ## ## Without quotes ##

"log-error = /var/log/mysql/error.log"

Now try to start again.. first try to start normally. If unsuccessful , try in safe mode.
"mysqld_safe --skip-grant-tables &"

if it starts, then do what you would. dump and then reinstall fresh if you want. If not, share the latest errors in /var/log/mysql/error.log
Many thanks to Freevps, Chris (cw1998), The Guy( ID 4810), optimus, GHP and the other  staff members.
#20
Yeah, my bad I forgot that mv is for moving files.
Okay, I commented link to conf.d and added that log-error line. But, still its not starting either with service cmd or in safe mode.
New Error log: http://pastebin.com/JVScEbsT




Users browsing this thread: 1 Guest(s)