If you are seeking for the mysql socket path to add in Rails database.yml file,
You can read mysql variables by
$ mysqladmin variables
and find the path.
If you are seeking for the mysql socket path to add in Rails database.yml file,
You can read mysql variables by
$ mysqladmin variables
and find the path.
Make sure that you have installed mysql server and mysql client. Else install by
$ sudo apt-get install mysql-server $ sudo apt-get install mysql-client
After that install the dependency library for mysql
$ sudo apt-get install libmysql-ruby libmysqlclient-dev
One day when I tried to login to mysql it is not permitting me to login as a root. Then I found the following solution to get rid of from this issue.
$ sudo /etc/init.d/mysql stop
$ sudo vim /etc/my.cnf
> Add the following line to section [mysqld]:
skip-grant-tables
$ sudo /etc/init.d/mysql start
$ mysql -e "update user set password = old_password('newpassword') where user = 'root'" mysql
$ sudo kill -9 PROCESS_ID
$ vim ~/mysql-init
> Add the following lines:
EOF UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root'; FLUSH PRIVILEGES; GRANT ALL ON *.* TO 'root'@'localhost'; EOF
$ mysqld_safe --init-file=~/mysql-init &
$ rm ~/mysql-init
$ sudo /etc/init.d/mysql restart
Login as root!
References:
1) http://www.ipreferjim.com/2011/06/cant-login-to-mysql-as-root/
To know about sphinx type
$ search
If you are getting error when starting sphinx make sure that the ‘indexer’,’searchd’,’search’ is under /usr/local/bin or under where sphinx specifies.
You are now ready to go…