View previous topic :: View next topic |
Author |
Message |
kraylus l33t


Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Sat Jun 22, 2002 6:58 am Post subject: before i install SQL |
|
|
i already attempted to install sql on the last machine and things went horribly wrong.
i used mysql.
i intend to use it again too. i want to use some kinda of CMS portal like geeklog or phpnuke so i'm forced to use sql.
my question is... after i emerge php, apache, sql and whatnot, what steps do i have to take to get sql working. the last time i tried it i was attempting to login and create a database and sql wouldn't let me login no matter what un and pw i used.
sooo... all im going to do is emerge it for now. if anyone can tell me what steps to take or point me to a document that can, i'd appreciate it
ryan _________________ I used gentoo BEFORE it was cool. |
|
Back to top |
|
 |
klieber Bodhisattva


Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Sat Jun 22, 2002 11:59 am Post subject: Re: before i install SQL |
|
|
kraylus wrote: | i want to use some kinda of CMS portal like geeklog or phpnuke so i'm forced to use sql. |
Don't use phpNuke. Use PostNuke instead. It's a fork from phpNuke that focuses on stability and security. It's also developed by a group of Open Source developers, whereas phpNuke is controlled by one (some would say facist) developer...
kraylus wrote: | my question is... after i emerge php, apache, sql and whatnot, what steps do i have to take to get sql working. |
First of all, make sure you have 'mysql' defined as a USE variable.
kraylus wrote: | the last time i tried it i was attempting to login and create a database and sql wouldn't let me login no matter what un and pw i used. |
By default, "root" is the username with a blank password.
kraylus wrote: | sooo... all im going to do is emerge it for now. if anyone can tell me what steps to take or point me to a document that can, i'd appreciate it  |
By far your best source is the MySQL manual, which will tell you, among other things, what the default privilages are as well as how to reset a forgotten root password.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
 |
kraylus l33t


Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Fri Jun 28, 2002 8:05 am Post subject: |
|
|
ok, ive reinstalled mysql finally....
i followed the instructions that i was given after running mysql_install_db script which were to start the mysql server, and do this:
Code: |
/usr/bin/mysqladmin -u root -p password 'new-password'
/usr/bin/mysqladmin -u root -h gentoo.kraylus.com -p password 'new-password' |
then i tried to login to the mysql server via:
Code: |
mysql -u root -p new-password
Enter password: new-password
ERROR 1049: Unknown database 'new-password' |
please note that all instances of "new-password" are replaced with my actual password.
im new to mysql so if anyone can shed some light on this.
i followed the instructions listed on default permissions and whatnot at the official mysql docs, but im getting the same errors OR im getting "you dont have permission".
thanks for your help.
ryan _________________ I used gentoo BEFORE it was cool. |
|
Back to top |
|
 |
amasidlover Apprentice

Joined: 16 Jun 2002 Posts: 293 Location: Manchester, UK
|
Posted: Sat Jun 29, 2002 8:07 am Post subject: |
|
|
if you add the the syntax of mysql client is
Code: | mysql <options> <database name> |
Therefore mysql client will interpret what you wrote as a request to access the database your_password. Since you left a space between -p and your_password.
I'd firstly try with nothing else.
I'd also be a bit wary of using the password on the command line if the database is supposed to be secure.... |
|
Back to top |
|
 |
Ferdy Retired Dev


Joined: 04 May 2002 Posts: 483 Location: España
|
Posted: Sat Jun 29, 2002 12:34 pm Post subject: |
|
|
Don't use phpNuke either postNuke use ez Publis http://developer.ez.no/developer/ezpublish wich is much better IMHO.
And to get mysql working you should do:
Code: |
[bash]# mysql -p
Password: [enter your password]
mysql>
|
Don't specify the database either the password in the command line
Just My 2 Cents _________________ Paludis, the next generation in package mangling. |
|
Back to top |
|
 |
analog n00b


Joined: 18 Apr 2002 Posts: 20 Location: Vancouver, Canada
|
Posted: Tue Sep 10, 2002 10:20 am Post subject: |
|
|
Kraylus, I had the same problem as you (can't access mysql as root) and what it turned out to be was a problem with actual "mysql" database not containing the correct user privilege entries. I have no idea what caused this, evidently it was some sort of problem the first time I ran the mysql_install_db script.
To get things working, I killed the whole mysql database directory (usually /var/lib/mysql) and then ran the mysql_install_db script again. After that, things worked like a charm.
Note: Simply running the mysql_install_db script without erasing the directory won't work, as the script is designed to leave any existing tables/databases intact. It only took me about a dozen tries to realize this  _________________ When the going gets weird, the weird turn pro --HST |
|
Back to top |
|
 |
dj_choco Tux's lil' helper


Joined: 13 Oct 2002 Posts: 144 Location: North America
|
Posted: Tue Nov 12, 2002 9:41 pm Post subject: removing entire mysql database directory |
|
|
analog wrote: |
To get things working, I killed the whole mysql database directory (usually /var/lib/mysql) and then ran the mysql_install_db script again. After that, things worked like a charm.
Note: Simply running the mysql_install_db script without erasing the directory won't work, as the script is designed to leave any existing tables/databases intact. It only took me about a dozen tries to realize this  |
You are correct Thank you! Now I can start using mysql |
|
Back to top |
|
 |
|