LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Tell my how to set up "mysql" step by step, please (https://www.linuxquestions.org/questions/linux-general-1/tell-my-how-to-set-up-mysql-step-by-step-please-323336/)

kornerr 05-14-2005 12:41 AM

Tell my how to set up "mysql" step by step, please
 
I've installed it. But it doesn't want to run.
AFAIK this is because I have no grant tables.
How to create them? What to do after that?
And I have no some "socket" (I don't know how to make it).
Can you tell my step by step how to set it up so that I can run avarage commands (select, create, etc).
Thanks.

trickykid 05-14-2005 06:04 AM

Here you go.. Chapter 2 of the online MyQL Reference Manual:

http://dev.mysql.com/doc/mysql/en/installing.html

You should really ask more detailed questions so members here don't have to rewrite information that is already out there, or you'll just get relinked to it.. etc.

juanbobo 05-14-2005 06:32 AM

chown mysql:mysql all of the files in the mysql directory under /var and in its subdirectory. Make sure you set a password with mysqladmin too.

John

kornerr 05-14-2005 11:11 AM

You're right - I've become very lazy...

kornerr 05-15-2005 09:17 AM

Well, I still don't uderstand what to do.
When I run "mysql_install_db" it prints:
Code:

root@darkstar:~# mysql_install_db
Installing all prepared tables
050515 22:11:25  /usr/libexec/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h darkstar password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

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

[1]+  Done                    mysqld_safe
root@darkstar:~#

Then I do what it tells me to:
Code:

root@darkstar:~# mysqladmin -u root xxx xxx
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists!
root@darkstar:~#

But I have no socket! And I didn't find how to create it.
"mysqld" doesn't run too:
Code:

root@darkstar:~# mysqld_safe &
[1] 884
root@darkstar:~# Starting mysqld daemon with databases from /var/lib/mysql
050515 22:13:35  mysqld ended


[1]+  Done                    mysqld_safe
root@darkstar:~#

Can anyone help me.
Thanks.

kornerr 05-16-2005 09:14 AM

Can anyone help me?

trickykid 05-16-2005 11:23 AM

chown -R mysql.mysql /var/lib/mysql

Then attempt to start mysql.

kornerr 05-16-2005 12:00 PM

Thanks, trickykid! This works!
"mysqld_safe" works.
But I'm sure to have other questions tomorrow... so don't forget this thread:)


All times are GMT -5. The time now is 03:53 AM.