I installed mysql on ubuntu server and i dont know what went wrong...it didnt install a mysql root user so i tried to uninstall and start over and now i cant unistall
i tried this
apt-get remove php5-mysql
apt-get remove mysql-server mysql-client
apt-get autoremove
but when i do
ps aux | grep mysql
root 6066 0.0 0.0 1772 540 pts/1 S 03:21 0:00 /bin/sh /usr/bin/mysqld_safe mysql 7065 0.0 0.6 58936 11900 pts/1 Sl 03:33 0:00 /usr/sbin/mysqld -- basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid -- socket=/var/run/mysqld/mysqld.sock --port=3306 root 7066 0.0 0.0 2956 688 pts/1 S 03:33 0:00 logger -t mysqld -p daemon.error root 22804 0.0 0.0 3056 780 pts/1 R+ 04:14 0:00 grep mysql
so i killed the processes and then tried to reinstall like this
apt-get -f install
sudo apt-get install mysql-server mysql-client
sudo mysqladmin -u root -h localhost password 'root'
but i get this
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
im confused..i keep installing and uninstalling mysql and the same result..any ideas
Try:
I think you should try
dpkg-reconfigure mysql-server-5.1
(not sure about exact version of the package, I don't have an Ubuntu box here right now, it depends on Ubuntu version anyway, so you'd better check it usingdpkg -l | grep mysql-server
).dpkg-reconfigure
resets a root password on Debian, I assume its behaviour is the same on Ubuntu.