LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-22-2008, 10:01 PM   #1
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-14.1
Posts: 874

Rep: Reputation: 51
Can't set Admin and user passwords for Mysql-5.0.37


Here is what I did:
Code:
bash-3.1# cp /etc/my-small.cnf /etc/my.cnf
bash-3.1# /usr/bin/mysql_install_db
Installing all prepared tables
Fill help tables
Quote:
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
?Where is the right location for Slackware12?
mysql had been trying to star tat boot time but would end and now there is no "end" message.
Currently:
Code:
 bash-3.1# slocate /mysql.server
/usr/share/mysql/mysql.server
/usr/man/man1/mysql.server.1.gz
Setting Password lost me. Is 'new-password' part of the command? Or am i supposed to write a text legible password in that space? If not once you hit enter all there is- is a green square sitting on the screen? How do I do this??
Start server.
Code:
bash-3.1#/usr/bin/mysqladmin -u root password 'new-password'
bash-3.1#/usr/bin/mysqladmin -u root -h NASCI password 'new-password'
"See the manual for more instructions." Where is this manual? How do I log onto MySQL?
Man Pages are gz how do I open then?

I found lots instructions other than Newbie Admin Guide, posts, and forum but not for slackware12. I did setup group and usr without home or group.
Mysql is the user name I set, mysql also shows up in /etc/group.

Code:
bash-3.1# ps -A | grep mysql
 3163 ?        00:00:00 mysqld_safe
 3197 ?        00:00:00 mysqld

bash-3.1# ls -| /var/lib/mysql
bash: /var/lib/mysql: is a directory

bash-3.1# cd /var/lib/mysql 
bash-3.1# ls
NASCI.err  ib_logfile0  ib_logfile1  ibdata1  mysql  test

bash-3.1# cd mysql
bash-3.1# ls
columns_priv.MYD   help_relation.frm  time_zone.MYI
columns_priv.MYI   help_topic.MYD     time_zone.frm
columns_priv.frm   help_topic.MYI     time_zone_leap_second.MYD
db.MYD             help_topic.frm     time_zone_leap_second.MYI
db.MYI             host.MYD           time_zone_leap_second.frm
db.frm             host.MYI           time_zone_name.MYD
func.MYD           host.frm           time_zone_name.MYI
func.MYI           proc.MYD           time_zone_name.frm
func.frm           proc.MYI           time_zone_transition.MYD
help_category.MYD  proc.frm           time_zone_transition.MYI
help_category.MYI  procs_priv.MYD     time_zone_transition.frm
help_category.frm  procs_priv.MYI     time_zone_transition_type.MYD
help_keyword.MYD   procs_priv.frm     time_zone_transition_type.MYI
help_keyword.MYI   tables_priv.MYD    time_zone_transition_type.frm
help_keyword.frm   tables_priv.MYI    user.MYD
help_relation.MYD  tables_priv.frm    user.MYI
help_relation.MYI  time_zone.MYD      user.frm
I do have a host error log.. too big to post here the high ligts:
Code:
071226  5:01:59 [ERROR] Fatal error:Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11

13  InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1

InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
Will try to edit out that data file but problem is I don't know how to set password, at this point reset... so i can get into mysql.
I have tried to piece this setup process from all kinds of resources caveat is that some configuration is Distro specific and most instructions do not explain how commands work. ie. You write this and expect this, do this... insert actual password here or when...some event happens.
Thank you in advance.

Last edited by NightSky; 11-22-2008 at 10:44 PM.
 
Old 11-22-2008, 11:39 PM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 229Reputation: 229Reputation: 229
The only steps you need to perform are... (there are other ways but this keeps it simple)

read first then copy one of the /etc/my-(small|med|huge).cnf files to /etc/my.cnf
example for a small server.

Code:
cp /etc/my-small.cnf /etc/my.cnf
Then run the following commands.

Code:
root@server:~# mysql_install_db
root@server:~# chown -R mysql:mysql /var/lib/mysql 
root@server:~# chmod +x /etc/rc.d/rc.mysqld 
root@server:~# /etc/rc.d/rc.mysqld start
root@server:~# mysql_secure_installation
root@server:~# mysql -u root -p
If you really want to connect via the network rather than through a local socket, you will need to edit part of /etc/rc.d/rc.mysqld
before you start the server.

Code:
# To allow outside connections to the database comment out the next line.
# If you don't need incoming network connections, then leave the line
# uncommented to improve system security.
SKIP="--skip-networking"
Should be all good after that.

Oh and in the 'new-password' above.. yes you are supposed to replace that with your actual password.

Last edited by mRgOBLIN; 11-22-2008 at 11:59 PM.
 
Old 11-23-2008, 12:35 AM   #3
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-14.1
Posts: 874

Original Poster
Rep: Reputation: 51
Thanks mRgoblin,
Quote:
If you really want to connect via the network rather than through a local socket, you will need to edit part of /etc/rc.d/rc.mysql
before you start the server.
What do you mean via network rather than local socket?? You tell me the pros and con? Please tell me during what steps mysql should be STOPPED or Running? An its' ok to install mysql_db again? This is all a first for me. Plez, if i get it going what is command for login to mySQL? I am trying to setup this old box as a file, webpages, mail,ftp server for my xpbox and laptop if i could small private dns server would be super! My personal learning lab Will go read,do this. Let u know outcome. Many thanks to u
 
Old 11-23-2008, 03:11 AM   #4
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by NightSky View Post
Thanks mRgoblin,
What do you mean via network rather than local socket?? You tell me the pros and con?
Well if the database and the webserver are on the same machine then you can connect to mysql via a local socket (the default).
You can run the DB and webservers on different machines if you need to. (I think you don't ) Local socket is more secure so lets leave it that way.

Quote:
Please tell me during what steps mysql should be STOPPED or Running?
The line "/etc/rc.d/rc.mysqld start" starts the server... steps before that the server should be stopped.
You need the server running to run the "mysql_secure_installation" and to login, query etc.

Quote:
An its' ok to install mysql_db again? This is all a first for me.
Yes but it will wipe out any existing databases... assuming you have no data there then go ahead and run it again.

Quote:
Plez, if i get it going what is command for login to mySQL? I am trying to setup this old box as a file, webpages, mail,ftp server for my xpbox and laptop if i could small private dns server would be super! My personal learning lab Will go read,do this. Let u know outcome. Many thanks to u
I gave you that as the last line before,
"mysql -u root -p"
will log you in as root and prompt for a password.

You can log in with a different user (after you create one)
mysql -u YOUR_USER_NAME -p YOUR_DATABASE_NAME
 
Old 11-23-2008, 06:15 PM   #5
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-14.1
Posts: 874

Original Poster
Rep: Reputation: 51
Good info mRgOBLIN,
mySql will run together with Apache on same machine. 129mb allocation is good enough?
My machine has 640mb ram and dbl that swap
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to forge Linux to use MySQL for user accounts and passwords. NaCo Linux - Security 1 06-01-2008 11:29 AM
Request : set passwords for many users [user accounts exist] using a shell script bv_uma Linux - Software 3 08-19-2006 10:01 AM
Sync MySQL passwords with local account passwords? turbine216 Linux - Software 2 02-18-2005 04:15 AM
Completely uninstalling MySQL and its passwords passwords...how? I locked myself out! Baix Linux - Newbie 2 01-30-2005 05:10 PM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration