help with setting up mysql
sys is 1.7ghz, 512m ram
120g /dev/hda, 160g /dev/hdb cd/dvd-rw /dev/hdc, cd-rw /dev/hdd MDK 10.1 KDE 3.2 W98 Need help setting up mysql. I don't have a clue about databases, clients, servers and permissions. Trying to install mythtv but have to install mysql first. I'm not having much success and I've been googling all day trying to come up with answers. I've been copying and pasting direct from the mysql manual with no luck. I DO NOT UNDERSTAND THIS PERMISSION CRAP!!! [don@localhost database]$ ls mc.sql old/ [don@localhost database]$ mysql -u root < mc.sql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) [don@localhost database]$ su [root@localhost database]# mysql -u root < mc.sql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) [root@localhost database]# HELP dlw |
Yeah, i spent many hours to understand it too long time ago. Here's some help.
Permission stuff is kept in a mysql database 'mysql'. It needs to be created after installalation. There is a script in /support-files sub directory of your installation directory if you installed from sources. If you installed binary this database was probebly created (not sure) A simple command like the one below should let you in if you are connecting from the same machine mysql is running. If not it means your configuration is diffrent because you changed it. # mysql when u get in: mysql> use mysql mysql> select User, Password, Host from user; will list all information. Remember that for every user and his password you must specify a hostname he can connect from. localhost is self-explainatory. % means any other host than localhost. To create new users use GRANT command (check syntax in manual) from mysql or install some mysql managers like MySQLCC. |
Have you created a password for root yet in mysql? After your installation you first have to type:
# mysqladmin -u root password "your password" to grant access for root. |
If you already done that then have you store your root password in my.cnf file?
If not, you will have to use '-p' in your command to prompt for root password. Otherwise it won't give you permission. Do # mysql -u root -p < mc.sql Enter password: [type your mysql root password here] HTH |
A simple command like the one below should let you in if you are connecting from the same machine mysql is running. If not it means your configuration is diffrent because you changed it.
# mysql Entered 'mysql' as usr 'don' and as 'root'. [don@localhost don]$ mysql ERROR 1045: Access denied for user: 'don@localhost' (Using password: NO) [don@localhost don]$ su [root@localhost don]# mysql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) As you can see, neither 'usr' or 'root' can get in. Mysql is running. It starts at bootup. Have you created a password for root yet in mysql? After your installation you first have to type: # mysqladmin -u root password "your password" This did not work. I have two passwords I use for everything. Neither worked. If you already done that then have you store your root password in my.cnf file? If not, you will have to use '-p' in your command to prompt for root password. Otherwise it won't give you permission. Do # mysql -u root -p < mc.sql Enter password: [type your mysql root password here] [root@localhost don]# mysql -u root -p < mc.sql bash: mc.sql: No such file or directory I found a 'mc.sql' in /usr/share/doc/mythtv-0.17/database/ CREATE DATABASE mythconverg; GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv"; FLUSH PRIVILEGES; GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv"; FLUSH PRIVILEGES; dlw |
All times are GMT -5. The time now is 02:48 PM. |