Unable to start mysql in redmine - mysql

Hi I'm unable to start my mysql and subversion using root as user.When im trying to start it by ./ctlscript.sh start mysql it is showing that mysql could not be started.The same is happening in the case of subversion also.In logs its showing that
error: Can't connect to local MySQL server through socket '/data/redmine/mysql/tmp/mysql.sock' (2) (Mysql2::Error)
error: [ pid=6349 thr=139977144923904 file=ext/common/agents/HelperAgent/RequestHandler.h:1731 time=2014-09-29 12:54:58.7821 ]: [Client 23] Cannot checkout session. An error occured while starting up the preloader.
Can any one help?

Please check whether your root user has the permission to start the mysql and other services.
If not please give the permissions using CHMOD

Related

MYSQL no longer starting on Mac with MAMP

Up until today MYSQL was working OK for months with 2 MAMP Drupal localhost builds.
But now MYSQL no longer loads.
When opening MAMP the Apache Server starts,
whereas the MYSQL Server does not start.
This means the "Open WebStart page" option is greyed over and the Drupal path that would normally load the site just displays an error.
Using Terminal, if I run:
which mysql
the response is:
/Applications/MAMP/Library/bin/mysql
But if I try to login into MYSQL via Terminal:
mysql -u (myuser) -p
I am prompted for the password, but after entering correct password I receive:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/Applications/MAMP/tmp/mysql/mysql.sock' (2)
I checked that path, and there is no mysql.sock file there. In that directory there is just one file titled .dummy that has no content in it.
Some forums relating to the same error suggest I check and stop any other running MYSQL instances, but I don't appear to have any.
For example I ran:
ps -ef | grep mysql
And I just receive this:
501 11212 10699 0 12:31pm ttys000 0:00.00 grep mysql
I don't entirely understand that response, but it looks like there is nothing running that I can 'kill'.
Also, if I try things like:
sudo service mysql start
I am prompted for my Mac user password, which I enter, but I am then given the error:
sudo: service: command not found
Any help here would be greatly appreciated.
EDIT: I ran:
mysqld
And received a lot of information! Too long to paste here,
but some things I noticed were:
2019-02-14T03:01:33.211495Z 0 [Note] --secure-file-priv is set to NULL.
Operations related to importing and exporting data are disabled
I don't know how to address the above, but it sounds like it's not helping the situation?
Further on from there, the first 'warning' from the list was:
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
I followed that advice and ran:
mysql_upgrade
and received this error:
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
Any ideas as to how to fix that?
Some other errors I noticed are:
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
[ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
[ERROR] Aborting
followed by a lot of lines of "shutting down plugin...(various)..." that ended in:
mysqld: Shutdown complete
Again, I am completely lost here?
After hours of trying out suggestions from various forum threads, such as:
Creating my.cnf files; or
Adjusting the MAMP php.ini file with extra code, or
Reinstalling MAMP again,or
Dumping the "ib_logfile.." files from the MAMP/db/mysql57 directory,
The only thing that finally resolved this for me was:
I suddenly remembered I copied all my working files to a backup.
so I checked the backup directories for MAMP/db/mysql57 and noticed there was a lot of content in there that for some reason was now missing from my live version,
so I deleted everything in the current MAMP/db/mysql57 directory and pasted all the backup items in.
Suddenly MAMP's MYSQL server lights up, the Startup page auto loads into my browser and I can run drush commands in my CLI and load the Drupal CMS again.
Happy Days!

MySQL 5.7.13 Homebrew on OS X EL Capitan: ERROR! The server quit without updating the PID file on startup

For some reason, when I try to start up the server using the mysql.server start command, it gives the following error.
ERROR! The server quit without updating PID file(/usr/local/var/mysql/hostname.pid)
I have no idea why this was happening and really don't know what to do about it. When I try to login to the server (Even though it's not running) with mysql -u root which doesn't have a password as of now, it gives me this error.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'
I'm guessing this is because the server isn't started, but I can't get it started in the first place.
I've tried:
Creating the PID file touch /usr/local/var/mysql/hostname.pid
brew update brew doctor and brew upgrade before a reinstallation of mysql
But nothing I do seems to work. Any help would be great.
Update:
I checked the error log located in /usr/local/var/mysql/hostname.err and gathered this information that may be helpful to solving this problem. There is a line in that file that states the following.
[ERROR] Can't start server: Bind on TCP/IP port: Address already in use
[ERROR] Do you already have another mysqld server running on port: 3306 ?
[ERROR] Aborting
So I guess there's another mysql server running somewhere that I'm not aware of? How can I shut this down?
I ran ps -aef | grep mysql and got the following input. Excluding the ps process.
502 34914 1 0 12:17pm ?? 0:00.02 /bin/sh /usr/local/opt/mysql/bin/mysqld_safe --bind-address=127.0.0.1 --datadir=/usr/local/var/mysql
502 35006 34914 0 12:17pm ?? 0:00.22 /usr/local/Cellar/mysql/5.7.13/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.7.13 --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/Cellar/mysql/5.7.13/lib/plugin --bind-address=127.0.0.1 --log-error=/usr/local/var/mysql/hostname.err --pid-file=/usr/local/var/mysql/hostname.pid
I figured it out once I ran the ps -aef | grep mysql command. I had to end all of the mysql processes. I guess another mysql server was running preventing me from connecting with the port 3306.
I killed the process using sudo kill -9 <pid>.

mysql wont start on Oracle Linux

I installed mysql following instructions on this link on my fresh installation of OEL 5. However when I try to start the mysql service with service mysqld start I keep getting
chown: `mysql:mysql': invalid user
chown: `mysql:mysql': invalid user
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
When I try to check user's information with id mysql I get user does not exist and when I try to add user, it says user already exists!
If I try to start mysql or ecen check its version for instance, I get:
[root#localhost ~]# mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Worst part is there is no mysql.sock file on my whole file system. I confirmed it by firing find / -name mysql.sock which returned empty result.
AM I missing some configuration step or something? I am absolutely clueless. Can someone please help me with this?
Please, which of the corresponding linux distribution are you using ? have you try to run it in sudo mode: sudo service mysqld start ? To see if mysql user have been created run cat /etc/passwd | grep 'mysql' or cat /etc/passwd; normally; it special user for specific purpose (here mysql administration).

MySQL not working after Kubuntu upgrade

I have just upgraded to Kubuntu 15.04 and MySQL is no longer working properly. The error is:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
I have checked and there is no mysqld.sock file at that location (and no directory 'var/run/mysqld'). I've tried creating a directory at 'var/run/mysqld' and using chmod to make it writable by all, then restarting MySQL using 'sudo service mysql restart', but this doesn't solve the problem.
MySQL seems to be running (it's coming up as loaded & active when I run 'sudo service mysql status'). There's nothing in the MySQL error log.
I can't find any mysqld.sock file at all (did a search across the whole file system).
Any solutions before I give up and purge/reinstall mysql would be gratefully appreciated!
EDIT to add:
The MySQL process itself isn't in the process list. No errors are thrown when I start/restart MySQL using 'sudo service mysql', and /var/log/mysql/error.log is empty.
I managed to get it working by changing the permissions on /var/lib/mysql and then running "mysqld" at the command line
So presumably some sort of permissions screw-up that happened as part of the Kubuntu upgrade.

How to disable --skip-grant-tables in MySQL?

I am trying to initialize the database for my OpenGTS installation. However, when I run the shell script that accomplishes this, I get the following error:
Version: 2.4.5
Database created: gts
[ERROR|DBAdmin.execCommands:843] ==> SQLException: DB grant error [jdbc:mysql://localhost:3306/]
[ERROR|DBAdmin.execCommands:843] Message: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
[ERROR|DBAdmin.execCommands:843] SQLState: HY000
[ERROR|DBAdmin.execCommands:843] ErrorCode: 1290
[DBAdmin.execCommands:843] java.sql.SQLException: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
java.sql.SQLException: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566)
at org.opengts.dbtools.DBConnection._executeUpdate(DBConnection.java:961)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:908)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:889)
at org.opengts.dbtools.DBProvider.grantDBUser(DBProvider.java:2132)
at org.opengts.dbtools.DBAdmin.execCommands(DBAdmin.java:841)
at org.opengts.db.DBConfig._main(DBConfig.java:1246)
at org.opengts.db.DBConfig.main(DBConfig.java:1361)
I think it's pretty clear that I need to disable --skip-grant-tables, but I am new to MySQL and SQL in general. Recently, I followed a tutorial to reset the MySQL root password and I believe I enabled --skip-grant-tables through that. I've tried looking for solutions to disable this, but haven't come across anything.
Anyone able to help?
Just type: mysqladmin shutdown and then start MySQL service by running command: service mysql start.
:-)
Check your my.cnf file, you probably added that option in there.
Try this:
sudo systemctl set-environment MYSQLD_OPTS=""
(It worked for me.)
you must have stopped the server and run this
mysqld_safe --skip-grant-tables due to root pwd chg
so stop the server and start it normal with a start