#1  
Old 31st May 2009, 19:17
DualFusion DualFusion is offline
Member
 
Join Date: Dec 2007
Posts: 67
Thanks: 4
Thanked 1 Time in 1 Post
Default Ubuntu Mysql Problem

Hi,

I installed mysql on my ubuntu jaunty server using:

Code:
sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
i also installed some other stuff later on. When I was done configuring my server, I tried to connect, but was unable to. I started getting errors about how 'root'@'localhost' (or anyone for that matter) was able to log in.

I reinstalled and the same thing happened again. I searched online for several solutions and they suggested that I remove /etc/mysql then do:

Code:
sudo apt-get --purge remove mysql-server mysql-client libmysqlclient15-dev
and then install again. I tried starting the service, but it failed saying that it couldn't load /etc/mysql/my.cnf. I did a directory listing of /etc/mysql and only found 2 files in it. debian.cnf and debian-start. Now I am so confused.

If possible, can you tell me how to properly fix this and get mysql working on my ubuntu jaunty server?

Thanks, Kevin.
Reply With Quote
Sponsored Links
  #2  
Old 1st June 2009, 13:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Did you accidentally delete any files in /etc/mysql/? Did you see any errors during the MySQL installation? Is there enough free disk space?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 13th June 2009, 01:47
mitochon mitochon is offline
Junior Member
 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I had what looks like the same issue as you, under Ubuntu Jaunty (9.04).

I finally ended up copying over the /etc/mysql directory from a different server.
Here's what the (working) contents looked like after the copy:

# ls -l /etc/mysql
total 16
drwxr-xr-x 2 root root 4096 2009-06-12 17:23 conf.d
-rw------- 1 root root 312 2009-06-12 17:23 debian.cnf
-rwxr-xr-x 1 root root 1198 2009-05-14 05:39 debian-start
-rw-r--r-- 1 root root 4088 2009-03-30 15:18 my.cnf

/etc/mysql# ls -l conf.d/
total 0

So, the copy provided the conf.d directory and the my.cnf file that the re-install failed to (re)create.
Here's the active info from my.cnf (after being filtered through " egrep -v '^$|^#' my.cnf " to remove empty lines and comment lines) :
-----my.cnf start------
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
expire_logs_days = 10
max_binlog_size = 100M
skip-federated
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
[isamchk]
key_buffer = 16M
!includedir /etc/mysql/conf.d/

-----my.cnf end------
Recreating that file may help you get mysql back running, as it appears to have been essential for me.

I'm going to put up a copy of the complete, default /etc/mysql/my.cnf on a page documenting this fix, just in case I or someone else needs it or finds it convenient. (The comments in the default my.cnf are very useful.)
That will be at http://handsomeplanet.com.
I can post an exact link when I'm done if anyone is interested. Thanks.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail -Ubuntu 8.04 c4rdinal HOWTO-Related Questions 112 23rd August 2011 10:49
upgraded Ubuntu 8.10 to Ubuntu 9.04, mail receiving problem. jtt General 1 10th May 2009 21:51
mysql max connections problem zucco Installation/Configuration 2 27th February 2009 10:50
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
PHP problem or MySql problem , maybe both? reddog Server Operation 7 16th August 2006 09:21


All times are GMT +2. The time now is 09:34.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.