View previous topic :: View next topic |
Author |
Message |
timvor n00b
Joined: 14 Aug 2003 Posts: 7 Location: South Africa
|
Posted: Tue Sep 16, 2003 12:30 pm Post subject: mysql problems!!!!!!! |
|
|
hi all , been following the virtual mailhosting guide but got stuck with the mysql install.
done the following
# emerge mysql
# ebuild /var/db/pkg/dev-db/mysql-4.0.13-r3/mysql-4.0.13-r3.ebuild config
#cd /var/lib/mysql
#chown -R mysql:root mysql
#/usr/bin/mysql_install_db
which completed succesfully and started fine
1st problem
/usr/bin/mysqladmin -u root -h mymachine password pass
fails with 'Host mymachine.mydomain.com is not allowed to connect to this mysql server
this has never worked , but perhaps i had different error 1st time
2nd problem
/usr/bin/mysqladmin -u root password pass
This accepted once only
# /etc/init.d/mysql start
# mysqladmin -u root -p create mailsql
# mysql -u root -p mailsql < genericmailsql.sql
# mysql -u root -p mysql
mysql> GRANT SELECT,INSERT,UPDATE,DELETE
-> ON mailsql.*
-> TO mailsql@localhost
-> IDENTIFIED BY '$password';
-> quit
from now on i cant get any thing except
Enter password:
/usr/bin/mysqladmin: connect to localhost failed
error "\'access denied for user: root@localhost Using password yes
how do i undo this mess to a clean state to try this again, or reset the password, as it seems the password i am entering is not correct
I have solved just about every other problem I experienced by searching the forums so thanks to all who contribute
_________________ tongue tied and twisted , just another GUI bound misfit I |
|
Back to top |
|
|
mglauche Retired Dev
Joined: 25 Apr 2002 Posts: 564 Location: Germany
|
Posted: Tue Sep 16, 2003 2:24 pm Post subject: |
|
|
the brute force method: remove everything in /var/lib/mysql/mysql/, and rerun the config script (mysql_install_db) - but beware, this might serious break existing mysql data ! so only use it on new installations |
|
Back to top |
|
|
timvor n00b
Joined: 14 Aug 2003 Posts: 7 Location: South Africa
|
Posted: Tue Sep 16, 2003 2:36 pm Post subject: |
|
|
am trying that now , thanks _________________ tongue tied and twisted , just another GUI bound misfit I |
|
Back to top |
|
|
elliotte n00b
Joined: 05 Sep 2003 Posts: 27
|
Posted: Sun Sep 21, 2003 10:10 pm Post subject: Did this work? |
|
|
I am having similar problems after my first mysql install. Did your fix work? |
|
Back to top |
|
|
dain-bramage n00b
Joined: 11 Jul 2003 Posts: 25
|
Posted: Mon Jan 26, 2004 10:50 pm Post subject: |
|
|
Having same problem here, anyone know how to fix this? |
|
Back to top |
|
|
mterlouw n00b
Joined: 17 Feb 2004 Posts: 32
|
Posted: Wed Feb 25, 2004 11:31 pm Post subject: |
|
|
I had the same problem. The guide isn't so great about holding your hand at every step it seems. When you first run mysql_install_db, it generates the following output:
Code: | PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/etc/init.d/mysql start (you have to start the server first!)
/usr/bin/mysqladmin -u root -h *hostname* password 'new-password'
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions. |
Enter your own hostname where it says *hostname*. Also I'm assuming you place the password in the single quotes where it says 'new-password'. I guess I'll try and see what happens.
Maybe the guide should tell you that you need to set the password using those commands because it's easy to miss. |
|
Back to top |
|
|
mterlouw n00b
Joined: 17 Feb 2004 Posts: 32
|
Posted: Wed Feb 25, 2004 11:51 pm Post subject: |
|
|
Ok, I just tried it and it appears to have worked. Just type those two commands from the last post to set the password. I don't know if they both are needed, but I did them both just in case. I had to add -p for the second command because after the first command the root password was in effect.
Also, when doing this step: Code: | # mysql -u root -p mysql
mysql> GRANT SELECT,INSERT,UPDATE,DELETE
-> ON mailsql.*
-> TO mailsql@localhost
-> IDENTIFIED BY '$password';
-> quit |
...substitute whatever you want the mysql password to be for $password. |
|
Back to top |
|
|
sputicus n00b
Joined: 03 Mar 2004 Posts: 10
|
Posted: Tue Mar 09, 2004 7:45 am Post subject: |
|
|
Thanks, the substitution for '$password' was the hint I needed to get out of this exact same problem.
Not being a mysql expert, I assumed that '$password' meant something to the mysql engine. The assumption that the reader would understand the "put your password here" subtext mislead me for at least an hour. |
|
Back to top |
|
|
amigabill n00b
Joined: 05 May 2003 Posts: 59
|
Posted: Mon Mar 15, 2004 12:38 am Post subject: Re: mysql problems!!!!!!! |
|
|
I'm havnig problems with this as well.
Code: | bash-2.05b# mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/etc/init.d/mysql start (you have to start the server first!)
/usr/bin/mysqladmin -u root -h tivo password 'new-password'
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
|
Seems to look OK. The first command there, "/etc/init.d/mysql start" seems to work OK.But the next one, "/usr/bin/mysqladmin -u root -h tivo password 'new-password'" doesn't play nicely:
Code: |
bash-2.05b# /usr/bin/mysqladmin -u root -h tivo password mynewpasswd
/usr/bin/mysqladmin: connect to server at 'tivo' failed
error: 'Lost connection to MySQL server during query'
|
When I'm told "/etc/init.d/mysql start (you have to start the server first!)", is that part in parentheses telling me to start the server before I run that command, or does this command actually do the server starting?? What else might be going wrong here?? I've got my hostname working
Code: | bash-2.05b# hostname
tivo
|
and I've got a static IP address working. I did make up a domain name that doesn't necessarily exist. Should I take my cablemodem domain instead? Or jost not have a domainname?
Or does something else need done, another emerge package, or something? My ultimate goal is to get mythtv running... |
|
Back to top |
|
|
sklettke Guru
Joined: 05 Nov 2002 Posts: 352 Location: Madison, WI
|
Posted: Thu May 27, 2004 4:03 am Post subject: Re: mysql problems!!!!!!! |
|
|
amigabill wrote: | I've got a static IP address working. I did make up a domain name that doesn't necessarily exist. Should I take my cablemodem domain instead? Or jost not have a domainname?
Or does something else need done, another emerge package, or something? My ultimate goal is to get mythtv running... |
Anyone have any suggestions yet regarding this? I'm having exactly the same problem.
Thanks.
Scott _________________ Jab.ID: scottk@jabber.org
Kernel: 2.6.11-rc3-nitro0
KDE 3.3.2 with Xorg
MythBox: 2.6.5-gentoo-dev-r2 (LVMed 360GB in XFS; Athlon 2500+) |
|
Back to top |
|
|
bocacorazon n00b
Joined: 07 May 2004 Posts: 31
|
Posted: Mon Jun 14, 2004 1:04 pm Post subject: Exactly the same problem... |
|
|
I also have a domain name that doesn't exist...
It does not recognize the (local) host.
Should I create an entry on the /etc/hosts file with the machine's address?
I would not like to do that since it gets the address via DHCP |
|
Back to top |
|
|
Mr_Maniac Guru
Joined: 10 Jun 2004 Posts: 546
|
Posted: Mon Jun 14, 2004 1:51 pm Post subject: |
|
|
Hmm.. Try to add the user with:
Quote: | GRANT (What to grant) ON (DATABASE) TO (user)@'%' IDENTIFIED BY (password); |
This allows access for (user) from ANY machine!
Or you can try the REAL hostname of your machine (not localhost)... _________________ AMD Ryzen 5900X
64 GB DDR4 RAM
GeForce RTX 3080
Gentoo Linux (most recent stable kernel - amd64)
Windows 11 x64 |
|
Back to top |
|
|
Herring42 Guru
Joined: 10 Mar 2004 Posts: 373 Location: Buckinghamshire
|
|
Back to top |
|
|
|