LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2005, 09:27 PM   #1
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Rep: Reputation: 30
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
 
Old 03-21-2005, 09:48 PM   #2
pave
Member
 
Registered: Oct 2004
Posts: 42

Rep: Reputation: 15
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.
 
Old 03-22-2005, 02:44 AM   #3
susje
LQ Newbie
 
Registered: Dec 2004
Posts: 17

Rep: Reputation: 0
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.
 
Old 03-22-2005, 03:06 AM   #4
susje
LQ Newbie
 
Registered: Dec 2004
Posts: 17

Rep: Reputation: 0
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
 
Old 03-22-2005, 07:45 AM   #5
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Original Poster
Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up Ruby and mysql on FC3 sianz99 Fedora 1 10-02-2005 03:43 PM
Setting up MySQL on Mandrake 9.1 sheds Mandriva 1 10-29-2004 01:37 PM
Setting up mysql without user.frm?!?! silversky Slackware 1 02-04-2004 04:01 PM
Setting up MySQL sat48 Linux - Software 3 07-27-2003 03:22 PM
setting up mysql banelion Linux - General 2 11-28-2002 11:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration