LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MySQL (https://www.linuxquestions.org/questions/linux-software-2/mysql-61313/)

Hollywood W 05-23-2003 02:05 AM

MySQL
 
Went to mysql.com and downloaded mysql 4.0 the recommended download. I downloaded the tar.gz file and untared it then did ./configure, make, make install....

ok what am I supposed to do next? I tried to executing mysql by typing:
mysql at the prompt and I get a funky message saying:

[wpei@localhost wpei]$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[wpei@localhost wpei]$

Help would be greatly appreciated...

mcleodnine 05-23-2003 02:37 AM

You need to create the permission tables and other fun stuff before you can do anything with it. It's in the documentation... somewhere :) It's a simple enough script that automates it for you.

There's also a script for starting the mysqld/safe_mysqld process.

Keep reading you're almost there. :)

Hollywood W 05-23-2003 04:05 AM

Are you talking about this documentation?

http://www.mysql.com/documentation/m...ry_notes-Linux

Been reading it over and over again and doesn't seem to be written for regular Joe's like myself.

jharris 05-23-2003 04:12 AM

I think he's talking about http://www.mysql.com/doc/en/Post-installation.html which steps you through making the basic permissions database. Note that you have to start the server before you can do this with "mysqld_safe &".

HTH

Jamie...

cyber 05-23-2003 05:47 AM

try this:

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &
or
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
if you are running MySQL 4.x.

Hollywood W 05-24-2003 03:59 AM

Went to: http://www.mysql.com/doc/en/Post-installation.html
and got up to:

[root@localhost mysql-4.0.13]# ./bin/mysqld_safe --user=mysql &
[1] 4173
[root@localhost mysql-4.0.13]# bash: ./bin/mysqld_safe: No such file or directory

[1]+ Exit 127 ./bin/mysqld_safe --user=mysql

This doesn't make any sense to me 'cus I have no idea what I'm doing at this point, all I know is it's supposed to set me up to start using mysql with a test table.

Please help poor me. All I know how to do is run SQL commands. And use JDBC to access an already setup mysql.

This is not easy...

mcleodnine 05-24-2003 04:14 AM

if you built and installed (or your package manager placed) mysql in /usr/local/mysql then you might want to try the full path name to mysqld_safe.
Code:

/usr/local/mysql/bin/mysqld_safe --user=mysql
Try a 'find /usr -name mysqld_safe' and see where it placed the startup script. Then run the startup with the full path name.

Hollywood W 05-24-2003 05:27 AM

now I get:

[wpei@localhost scripts]$ mysqld_safe --user=mysql
Starting mysqld daemon with databases from /var/lib/mysql
/usr/local/bin/mysqld_safe: line 277: /var/log/mysqld.log: Permission denied
rm: cannot remove `/var/lib/mysql/mysql.sock': Permission denied
/usr/local/bin/mysqld_safe: line 283: /var/log/mysqld.log: Permission denied
tee: /var/log/mysqld.log: Permission denied
030524 06:25:17 mysqld ended
tee: /var/log/mysqld.log: Permission denied

why don't I have privledges? if I switch to root this is what I get:

[root@localhost scripts]# mysqld_safe user=mysql
Starting mysqld daemon with databases from /var/lib/mysql
030524 06:27:18 mysqld ended

[root@localhost scripts]#

what good is it if the damm thing connects then quits immediately?

chenggg 05-24-2003 09:25 AM

i still don't understand.


All times are GMT -5. The time now is 03:35 PM.