If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Starting MySQL problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-23-06, 04:12
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,259
Quote:
Originally Posted by satimis
...MySQL is completely new to me....
we aLL have to start somewhere....

Id stringly reccomend that you download the MySQL desktop suite (Administrator, Query Browser & Workbench)

Usually when you see the 'Access denied for user' message it indicates that the specified user doesn't have sufficient privilieges for the requested operation whihc is MySQL speak for a security / logon fail

you can set user privileges either by the command line within the MySQL DOS client, or in MYSQL Administrator. MySQL uses a fairly robust security model, and you have to explicitly grant permissions to users on objects within the DB. Personally I find it easier to set them within MySQL Administrator.

If you are learning AND in a development environment then Id suggest you create a super user account with global access to do anything to any database form any IP address or host, and then create accounts with permsissions as required as you learn the principles behind MySQL security.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #2 (permalink)  
Old 11-23-06, 07:44
satimis satimis is offline
Registered User
 
Join Date: Jun 2006
Posts: 56
Hi healdem,

Tks for your advice and URL.

Quote:
Usually when you see the 'Access denied for user' message it indicates that the specified user doesn't have sufficient privilieges for the requested operation whihc is MySQL speak for a security / logon fail
Initially I followed the ServerGuide of Ubuntu-6.06.1-LAMP-server-amd64
https://help.ubuntu.com/ubuntu/serverguide/C/index.html

to install MySQL. After installation completed as instructed on the said guide, I ran;

$ mysql -u root -p
Enter password:
Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 5.0.22-Debian_0ubuntu6.06.2-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Then
mysql> create user 'satimis'@'hostname' identified by 'satimispassword';
Code:
Query OK, 0 rows affected (0.03 sec)
mysql>exit

$ sudo /etc/init.d/mysql restart
MySQL restarted without any warning.

Afterwards I found;
http://www.howtoforge.com/perfect_setup_ubuntu_6.06_p4

on Internet and followed its "10 MySQL" to further tuning MySQL. This guide suggested installing "libmysqlclient12-dev". To my knowledge ".dev" package is for recompiling software. First I hesitated but finally following its instruction and coming to present situation.

On restart MySQL
$ sudo /etc/init.d/mysql restart
Password:
Code:
Stopping MySQL database server: mysqld...failed.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
Killing MySQL database server by signal: mysqld.
Starting MySQL database server: mysqld.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
satimis@ubuntu:~$ /usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'

(hanging here.  I don't know whether waiting for input or otherwise.  
If for input what shall I type here?)
Hitting [Enter] it prompted;
satimis@ubuntu:~$

Shall I remove "libmysqlclient12-dev"?

Quote:
If you are learning AND in a development environment then Id suggest you create a super user account with global access to do anything to any database form any IP address or host, and then create accounts with permsissions as required as you learn the principles behind MySQL security.
Yes I'm learn MySQL from the beginning. Anyway I'll go through the document on your URL first.

Others noted with tks.

Tks.

B.R.
satimis


Edit: * * *
$ ps -ef | grep mysql
Code:
root      5742     1  0 20:32 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     5803  5742  0 20:32 pts/0    00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      5804  5742  0 20:32 pts/0    00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
satimis   5908  5643  0 20:45 pts/0    00:00:00 grep mysql
MySQL seems working?

Last edited by satimis; 11-23-06 at 07:49.
Reply With Quote
  #3 (permalink)  
Old 11-23-06, 08:00
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,259
on the face of it MySQL is working.... otherwise you wouldn't the the access denied message

Quote:
Originally Posted by satimis
....Then
mysql> create user 'satimis'@'hostname' identified by 'satimispassword'....
... so you have created a user, but you haven't given that user any privileges (rights).

Have you tried downloading MysQL Administrator?
can you open Administrator.. if so it indicates that it can find a working MySQL server.

You will probably need to sign on as 'root' to set up permissions / privileges for your new userid.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #4 (permalink)  
Old 11-23-06, 08:23
satimis satimis is offline
Registered User
 
Join Date: Jun 2006
Posts: 56
Hi healdem,

Quote:
Have you tried downloading MysQL Administrator?
Whether you meant "mysql-admin" and "mysql-admin-common"?

$ sudo apt-cache search mysql | grep admin
Code:
dpsyco-mysql - Automate administration of access to mysql
eskuel - A pretty PHP administration tool for MySQL databases
kmysqladmin - Kde graphical frontend for mysql servers
mysql-admin - GUI tool for intuitive MySQL administration
mysql-admin-common - Architecture independent files for MySQL Administrator
phpmyadmin - set of PHP-scripts to administrate MySQL over the WWW
tora - A graphical toolkit for database developers and administrators
courier-webadmin - Courier Mail Server - Web-based administration frontend
They seem installed already

Quote:
can you open Administrator.. if so it indicates that it can find a working MySQL server.
How to start it? TIA

Others noted with tks.

B.R.
satimis
Reply With Quote
  #5 (permalink)  
Old 11-23-06, 08:38
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,259
I dont know ubuntu, its a while since I used SUSE

in SUSE you could either run it direct from the command line, or perhaps slightly easier by adding a shortcut using a menu editor. Im guessing as you have KDE it should be relatively straight forward. you willneed toknow the path to the administrator program.

Incidentally Id strongly reccomend that you download the most recent versions from the MySQL site, MySQL programs are often in a stae of flux (read constant development).
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On