It will be terminated immediately when installing MYSQL in AIX - mysql

After running mysql_install_db in mysql/scripts, I ran mysqld_safe, and the following error appeared.
220329 00:08:10 mysqld_safe Logging to '/home/ts_dist/mysql57/data/daenerys.err'.
220329 00:08:10 mysqld_safe Starting mysqld daemon with databases from /home/ts_dist/mysql57/data
220329 00:08:11 mysqld_safe mysqld from pid file /home/ts_dist/mysql57/data/daenerys.pid ended
MySQL is tar.The gz file was moved to the corresponding directory and decompressed, and it was not installed with the rpm command.
Is it a problem that can occur during this process?

Related

MySQL on OSX Sierra can't start: The server quit without updating PID file

Several problems with mysql since last Sierra Update.
Reinstalled several times with brew or mysql dmg and followd many many "solutions" on SO.
Finally it worked but after a Mac Crash, I face the same problem.
MySql won't start from preference panel
Mysql won't start from terminal: Can't connect through /tmp/mysql.sock...of course, mysqld is not running
trying to start mysqld:
sudo /usr/local/mysql/support-files/mysql.server start
ERROR! The server quit without updating PID file (/usr/local/mysql/data/My-iMac.local.pid)
sudo /usr/local/mysql/bin/mysqld several errors and shutdown
a bit stuck
Just tried this
sudo /usr/local/mysql/bin/mysqld_safe
mysqld_safe Logging to '/usr/local/mysql/data/My-iMac.local.err'.
Starting mysqld daemon with databases from /usr/local/mysql/data
mysqld_safe mysqld from pid file /usr/local/mysql/data/My-iMac.local.pid ended
And now looking at error log, the explanation is clear:
tail /usr/local/mysql/data/My-iMac.local.err
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
So I added in my.cnf
[mysqld]
innodb_force_recovery = 1
and now it starts!
It was probably due to previous Mac Crash
In my case the owner of the data folder was changed after an OS update.
After fixing this with …
sudo chown -R mysql /usr/local/mysql/data
… everything worked like a charm again.
Oh, I feel your pain. I've had this happen many times. Stopping the processes didn't always work. To solve this I simply went into System Preferences and MySQL... stop the process from there and try to restart.

Can't reset root password on MySql Server Mac OS

I've been struggling with this problem for 2 days and I couldn't understand why I'm having this problem.
I've installed MySql server on my Mac, it's working just fine, but I need to reset root password. I followed this tutorial - http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html. And when I put this command
mysqld_safe --init-file=/Users/user/Documents/mysql-init &
I've got this output
[1] 2551
bash-3.2# 151127 16:06:07 mysqld_safe Logging to '/usr/local/mysql/data/MacBook-Pro-Mojo.local.err'.
151127 16:06:07 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
151127 16:06:09 mysqld_safe mysqld from pid file /usr/local/mysql/data/MacBook-Pro-Mojo.local.pid ended
Of course, my password wasn't changed at all. Could you explain me how can I make it work?
run this command:
sudo dpkg-reconfigure mysql-server-N.N
where N.N is the MySQL Server version. Mine was 5.5

mysql : sudo mysqld_safe --skip-grant-tables & hangs

I have accidentally deleted all mysql users and hence not able to access any database.
i am using http://www.kevssite.com/2011/07/02/deleted-rootlocalhost-account-in-mysql/ link to recreate root user account again.
but the problem is that whenever I issue command sudo mysqld_safe --skip-grant-tables & my scripts hangs forever. because of this i am not able to follow next steps mentioned in the above given link.
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.
151130 18:17:51 mysqld_safe Logging to '/var/log/mysql/error.log'.
151130 18:17:51 mysqld_safe A mysqld process already exists
Make sure to kill mysqld first before running mysqld_safe:
killall mysqld mysqld_safe
# give it 10 seconds or so to shut down cleanly
ps aux | grep mysqld
# if you still see mysqld, more violent action might be needed,
# but it might
# corrupt your data. But if it a test or empty install, no problem
killall -9 mysqld mysqld_safe
# now mysqld_safe should start
And you should also remove either syslog or log-error from my.cnf to address the complaint in the first error message from mysqld_safe.

MySQL on ubuntu 12.04 won't run after MySQL Workbench installed

Recently I installed MySQL Workbench 6.2 and used it to create ER diagrams of the MySQL 5.5.41 databases I'm working with on Ubuntu 12.04. Everything worked fine until I restarted Ubuntu and suddenly mysql was no longer running. Running mysqld from the command line results in this:
150216 12:50:37 [ERROR] Can't read from messagefile '/usr/share/mysql/english/errmsg.sys'
150216 12:50:37 [Warning] Can't create test file /var/lib/mysql/euler.lower-test
150216 12:50:37 [Warning] Can't create test file /var/lib/mysql/euler.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
150216 12:50:37 [ERROR] Aborting
150216 12:50:37 [Note]
The file /usr/share/mysql/english/errmsg.sys exists, owned by root, with permissions 644. The directory /var/lib/mysql exists, owned by mysql, with permissions 700.
I'm guessing that the installation of Workbench changed something (maybe config files) so that mysql is no longer working, but after a fair amount of Internet research, I have not discovered how to solve this problem. Any help will be greatly appreciated.
Seems like file permission problem. Try running mysqld again using sudo
If this doesn't help, maybe you shouldn't be starting it directly via mysqld. Check if the installer package added a service
sudo service --status-all | grep mysql
And if one exist, use it to start mysql, typically:
sudo service mysqld start
Also don't forget to check if mysqld is already running. If so you can't start duplicate process. I know this sound silly but has happened to me before
ps -ef | grep mysqld

why the mysqld is located in 4 places in linux system?

I have confusion while I'm execute the command "# find / -name mysqld". Because the mysqld is located in four places which are:
/usr/libexec/mysqld
/etc/rc.d/init.d/mysqld
/var/lock/subsys/mysqld
/var/run/mysqld
What is the purpose of another three mysql daemons?
Here is the following explanations
/usr/libexec/mysqld : The actual binary executable
/etc/rc.d/init.d/mysqld : The service startup file (text file)
/var/run/mysqld : PID/run file folder (mysqld writes a run file in this folder)
/var/lock/subsys/mysqld : not sure
If you run which mysqld you should see the first one
You never run that directly
When you run service mysqld start, it calls /etc/rc.d/init.d/mysqld to kickoff a program called mysqld_safe (Run which mysqld_safe). mysqld_safe and mysqld work together to be the server daemon.
In turn, mysqld_safe will kickoff mysqld and then checks for an exit code. You can run less /etc/rc.d/init.d/mysqld and see this. If mysqld did not end due to system shutdown or a normal service mysql stop, mysqld_safe will attempt to restart mysqld.