Cant connect to database server?
I installed mysql. Created a database. Then, cloned to another Linode. I figured it doesnt hurt for app server to have mysql.
After, I followed these two links
database set up
http://library.linode.com/databases/mys ... 0.04-lucid
stand alone database server
http://library.linode.com/databases/mys ... sql-server
I figured all was good to go. Then, app server said...
Quote:
'your php installation appears to be missing the mysql extension which is required by wordpress'
On the database server, service mysql status...
Quote:
'start: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory'
then, I did
service mysql start... again
Quote:
'start: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory'
reboot... same error. Shut down the server, a few hours later tried again. Like a broken record tried, service mysql status...
Quote:
mysql start/running, process 2077
However, it still doesnt connect to app server.
/var/log/mysql/error.log
Code:
110818 1:24:34 [Note] Event Scheduler: Purging the queue. 0 events
110818 1:24:34 InnoDB: Starting shutdown...
110818 1:24:35 InnoDB: Shutdown completed; log sequence number 0 44233
110818 1:24:35 [Note] /usr/sbin/mysqld: Shutdown complete
110818 1:24:35 [Note] Plugin 'FEDERATED' is disabled.
110818 1:24:35 InnoDB: Started; log sequence number 0 44233
110818 1:24:35 [Note] Event Scheduler: Loaded 0 events
110818 1:24:35 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.10' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110818 1:24:44 [Note] /usr/sbin/mysqld: Normal shutdown
110818 1:24:44 [Note] Event Scheduler: Purging the queue. 0 events
110818 1:24:44 InnoDB: Starting shutdown...
110818 1:24:44 InnoDB: Shutdown completed; log sequence number 0 44233
110818 1:24:44 [Note] /usr/sbin/mysqld: Shutdown complete
110818 1:24:44 [Note] Plugin 'FEDERATED' is disabled.
110818 1:24:44 InnoDB: Started; log sequence number 0 44233
110818 1:24:44 [Note] Event Scheduler: Loaded 0 events
110818 1:24:44 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.10' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110818 1:50:46 [Note] /usr/sbin/mysqld: Normal shutdown
110818 1:50:46 [Note] Event Scheduler: Purging the queue. 0 events
110818 1:50:46 InnoDB: Starting shutdown...
110818 1:50:46 InnoDB: Shutdown completed; log sequence number 0 44233
110818 1:50:46 [Note] /usr/sbin/mysqld: Shutdown complete
110818 1:50:46 [Note] Plugin 'FEDERATED' is disabled.
110818 1:50:46 InnoDB: Started; log sequence number 0 44233
110818 1:50:46 [Note] Event Scheduler: Loaded 0 events
110818 1:50:46 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.10' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110818 1:50:52 [Note] /usr/sbin/mysqld: Normal shutdown
110818 1:50:52 [Note] Event Scheduler: Purging the queue. 0 events
110818 1:50:52 InnoDB: Starting shutdown...
110818 1:50:53 InnoDB: Shutdown completed; log sequence number 0 44233
110818 1:50:53 [Note] /usr/sbin/mysqld: Shutdown complete
110818 1:50:54 [Note] Plugin 'FEDERATED' is disabled.
110818 1:50:54 InnoDB: Started; log sequence number 0 44233
110818 1:50:54 [Note] Event Scheduler: Loaded 0 events
110818 1:50:54 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.10' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110818 5:12:47 [Note] /usr/sbin/mysqld: Normal shutdown
110818 5:12:47 [Note] Event Scheduler: Purging the queue. 0 events
110818 5:12:47 InnoDB: Starting shutdown...
110818 5:12:47 InnoDB: Shutdown completed; log sequence number 0 44233
110818 5:12:47 [Note] /usr/sbin/mysqld: Shutdown complete
110818 5:16:02 [Note] Plugin 'FEDERATED' is disabled.
110818 5:16:03 InnoDB: Started; log sequence number 0 44233
110818 5:16:03 [Note] Event Scheduler: Loaded 0 events
110818 5:16:03 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.10' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110818 5:38:02 [Note] /usr/sbin/mysqld: Normal shutdown
110818 5:38:02 [Note] Event Scheduler: Purging the queue. 0 events
110818 5:38:02 InnoDB: Starting shutdown...
110818 5:38:02 InnoDB: Shutdown completed; log sequence number 0 44233
110818 5:38:02 [Note] /usr/sbin/mysqld: Shutdown complete
110818 13:37:26 [Note] Plugin 'FEDERATED' is disabled.
110818 13:37:27 InnoDB: Started; log sequence number 0 44233
110818 13:37:27 [Note] Event Scheduler: Loaded 0 events
110818 13:37:27 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.10' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110818 13:37:54 [Note] /usr/sbin/mysqld: Normal shutdown
110818 13:37:54 [Note] Event Scheduler: Purging the queue. 0 events
110818 13:37:54 InnoDB: Starting shutdown...
110818 13:37:55 InnoDB: Shutdown completed; log sequence number 0 44233
110818 13:37:55 [Note] /usr/sbin/mysqld: Shutdown complete
110818 13:39:11 [Note] Plugin 'FEDERATED' is disabled.
110818 13:39:08 InnoDB: Started; log sequence number 0 44233
110818 13:39:08 [Note] Event Scheduler: Loaded 0 events
110818 13:39:08 [Note] /usr/sbin/mysqld: ready for connections.
Then, tried mysql -u root -p, I was able to log in.
Then, tried
root@o:~# mysql -u 127.0.0.1 -p
Enter password:
ERROR 1045 (28000): Access denied for user '127.0.0.1'@'localhost' (using password: YES)
root@o:~# mysql -u 127.0.0.1 -p
Enter password:
ERROR 1045 (28000): Access denied for user '127.0.0.1'@'localhost' (using password: YES)
root@o:~# ps -ef | grep mysql
mysql 2077 1 0 13:39 ? 00:00:00 /usr/sbin/mysqld
root 2416 2386 0 13:50 pts/0 00:00:00 grep --color=auto mysql
root@o:~# ps aux | grep mysqld
mysql 2077 0.0 3.1 112568 16048 ? Ssl 13:39 0:00 /usr/sbin/mysqld
root 2418 0.0 0.1 3376 748 pts/0 S+ 13:50 0:00 grep --color=auto mysqld
on
http://library.linode.com/databases/mys ... sql-server
it states 'you dont have to install apache' ?
/etc/hosts
127.0.0.1 localhost
192.168.192.168 mysql.example.com mysql
192.168.192.169 app.example.com app
so, it just syncs with hostname mysql, and app
/etc/mysql/my.cnf
bind-address = mysql
shouldnt this stay as 127.0.0.1; doesnt this create a loop and more secure.
CREATE DATABASE webapplications;
GRANT ALL ON webapplications.* TO admin@'app' IDENTIFIED BY 'PASSWORD';
This defaults "Host" to 'app', not 'localhost'
?