Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Setting up mysql
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
noff
Guru
Guru


Joined: 11 Nov 2002
Posts: 388
Location: College Park, Maryland

PostPosted: Wed Apr 23, 2003 7:48 pm    Post subject: [Solved] Setting up mysql Reply with quote

I am trying to setup mysql for use with mythtv.

I emerged 4.0.12 and started it.

I ran mysql_install_db.

When I run
Code:
mysql < /usr/share/mythtv/database/mc.sql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)


I don't have anything set I don't think. How can I fix this? I there a way to wipe it all. The manual didn't help me because tis is a fresh install and it says a fresh install has no permissions.

If I try
Code:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'


I would really like some help.
_________________
What Larry was saying is that if you make it too easy for programmers, then poor programmers will be able to do things best left to good programmers, and will inevitably do them poorly. Everyone will suffer in the long term as a result." - Tom Chance


Last edited by noff on Sat May 03, 2003 9:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Wed Apr 23, 2003 8:21 pm    Post subject: Reply with quote

Hmm you can try doing the:

/usr/portage/.../mysql/mysql.ebuild config

thing again to reset the database permissions, etc. (You will lose all your databases I think)

It looks like you inadvertently set a password possibly running this command earlier.

Try this:

mysql -u root -p

and see if you can't figure out the password you may have used.
Back to top
View user's profile Send private message
noff
Guru
Guru


Joined: 11 Nov 2002
Posts: 388
Location: College Park, Maryland

PostPosted: Wed Apr 30, 2003 7:24 am    Post subject: Reply with quote

I got the password and was able to install the database. Now when I try to setup mythtv I get
Code:
QSqlDatabase warning: QMYSQL3 driver not loaded
QSqlDatabase: available drivers:
QSqlDatabase warning: QMYSQL3 driver not loaded
QSqlDatabase: available drivers:
Unable to open database:
Driver error was:
Driver not loaded
Database error was:
Driver not loaded


Which appears to be a mysql error.

Is there anyway to completely wipe everything about mysql off my computer and start over?undefined
_________________
What Larry was saying is that if you make it too easy for programmers, then poor programmers will be able to do things best left to good programmers, and will inevitably do them poorly. Everyone will suffer in the long term as a result." - Tom Chance
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed Apr 30, 2003 1:18 pm    Post subject: Reply with quote

Code:
emerge -C mysql
emerge mysql
ebuild /usr/portage/dev-db/mysql/mysql-versionblahblah.ebuild config
/etc/init.d/mysql start
rc-update add mysql default
Back to top
View user's profile Send private message
noff
Guru
Guru


Joined: 11 Nov 2002
Posts: 388
Location: College Park, Maryland

PostPosted: Wed Apr 30, 2003 4:11 pm    Post subject: Reply with quote

Whenever I run
Code:
ebuild /usr/portage/dev-db/mysql/mysql-3.23.56.ebuild config
* Hmm, it appears as though you already have the mysql
 * database in place.  If you are having problems trying
 * to start mysqld, perhaps you need to manually run
 * /usr/bin/mysql_install_db and/or check your config
 * file(s) and/or database(s) and/or logfile(s).

I really just want to start over wiping everything.undefined
_________________
What Larry was saying is that if you make it too easy for programmers, then poor programmers will be able to do things best left to good programmers, and will inevitably do them poorly. Everyone will suffer in the long term as a result." - Tom Chance
Back to top
View user's profile Send private message
rush
n00b
n00b


Joined: 23 Feb 2003
Posts: 5

PostPosted: Sat May 03, 2003 6:29 pm    Post subject: Reply with quote

I have been faced with the same problem like noff.
After some reading i found this a feature and not a bug.
After you have set a password for a user you (of course) have to use that password for any access to mysql. So the syntax for your problem would be:

mysqladmin -p -u root password 'newpassword'


rush
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Sat May 03, 2003 8:32 pm    Post subject: Reply with quote

To get rid of the leftovers, try:

rm -rf /var/lib/mysql
Back to top
View user's profile Send private message
noff
Guru
Guru


Joined: 11 Nov 2002
Posts: 388
Location: College Park, Maryland

PostPosted: Sat May 03, 2003 9:02 pm    Post subject: Reply with quote

Thank you splooge that is exactly the correct solution.
_________________
What Larry was saying is that if you make it too easy for programmers, then poor programmers will be able to do things best left to good programmers, and will inevitably do them poorly. Everyone will suffer in the long term as a result." - Tom Chance
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum