Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
before i install SQL
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
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Sat Jun 22, 2002 6:58 am    Post subject: before i install SQL Reply with quote

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 :D

ryan
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Sat Jun 22, 2002 11:59 am    Post subject: Re: before i install SQL Reply with quote

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 :D


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
View user's profile Send private message
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Fri Jun 28, 2002 8:05 am    Post subject: Reply with quote

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
View user's profile Send private message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 293
Location: Manchester, UK

PostPosted: Sat Jun 29, 2002 8:07 am    Post subject: Reply with quote

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
Code:
mysql -u root
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
View user's profile Send private message
Ferdy
Retired Dev
Retired Dev


Joined: 04 May 2002
Posts: 483
Location: España

PostPosted: Sat Jun 29, 2002 12:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
analog
n00b
n00b


Joined: 18 Apr 2002
Posts: 20
Location: Vancouver, Canada

PostPosted: Tue Sep 10, 2002 10:20 am    Post subject: Reply with quote

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
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Tue Nov 12, 2002 9:41 pm    Post subject: removing entire mysql database directory Reply with quote

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 :D Thank you! Now I can start using mysql
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