?
Solved

Mysql 3.23.55 linux installation problems

Posted on 2003-03-11
12
Medium Priority
?
426 Views
Last Modified: 2008-02-26
Im new to linux and now trying to put a webserver up.
i have done everything like examples and manuals told but still not working.. what am i doing wrong.

below is the command line that i have typed:
---------------------------------------------
cd /usr/sbin
groupadd mysql
useradd -g mysql mysql

cd /usr/local
tar -xzvf mysql-3.23.55-pc-linux-i686.tar.gz
ln -s mysql-max-3.23.55-pc-linux-i686/ mysql
cd mysql
scripts/mysql_install_db
chown -R root  .
chown -R mysql data
chgrp -R mysql .
./bin/safe_mysqld --user=mysql &
---------------------------------------------

it just says :
"Starting mysqld daemon with databases from /usr/local/mysql/data
030311 10:30:13  mysqld ended"

and when i try to open mysql with ./bin/mysql it gives me this:
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Exit 1

thats really weird because i ran the mysql-tests/mysql-tests-run and it passed all tests..
what can be wrong. i read somewhere that i should make a link from /var/lib/mysql/mysql.sock to /tmp with ln -s but there is not mysql.sock at var/lib.. the installation did not even make that folder...



0
Comment
Question by:Jonza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 3
12 Comments
 
LVL 1

Author Comment

by:Jonza
ID: 8109665
i also tried to install RPM package:
same problem
[root@xxx /]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

installed like this:
------------------------------------------------------
ftp mysql.secsup.org
ftp> cd /pub/linux/redhat/redhat/linux/7.2/en/os/i386/RedHat/RPMS
ftp> ls my*
  150 Here comes the directory listing.
    -rw-r--r-- 1 0 0 4837190 Sep 07 2001 mysql-3.23.41-1.i386.rpm
    -rw-r--r-- 1 0 0 461825 Sep 07 2001 mysql-devel-3.23.41-1.i386.rpm
    -rw-r--r-- 1 0 0 877039 Sep 07 2001 mysql-server-3.23.41-1.i386.rpm
    -rw-r--r-- 1 0 0 124580 Sep 07 2001 mysqlclient9-3.23.22-6.i386.rpm
ftp> mget my*
mget mysql-3.23.41-1.i386.rpm? y
226 File send OK.
mget mysql-devel-3.23.41-1.i386.rpm? y
226 File send OK.
mget mysql-server-3.23.41-1.i386.rpm? y
226 File send OK.
mget mysqlclient9-3.23.22-6.i386.rpm? y
226 File send OK.
ftp> bye

rpm -ivh *.rpm
------------------------------------------------------
0
 
LVL 15

Expert Comment

by:VGR
ID: 8110117
"Starting mysqld daemon with databases from /usr/local/mysql/data
030311 10:30:13  mysqld ended"

indicates a problem. You should find a file called my.err containing that kind of error (do a "find / -name *.err")

Do also "ps -aux" to check whether mysqld is running or not.
Then (if not running already) do "safe_mysqld" (no " &" at the end, contrary to normal practice)

It takes the default config values as per the my.ini/my.cfg file.

Is it launching OK ?

What's happening then ?
0
 
LVL 1

Author Comment

by:Jonza
ID: 8110145
i have tried the safe_mysqld without '&'..
doesn't launch.. just ssays Mysql Ended...
im trying to compile the source myself right now
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 15

Expert Comment

by:VGR
ID: 8110198
tsss tsss tsss

easy and simple solutions first 8-))
0
 
LVL 1

Author Comment

by:Jonza
ID: 8110349
vgr are you sure you could get this thing to work with that RPM package.. i tried compiling the source many times but it gives errors:
make[2]: *** [install-benchSCRIPTS] Error 1
make[2]: Leaving directory `/usr/local/mysql-3.23.55/sql-bench'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/usr/local/mysql-3.23.55/sql-bench'
make: *** [install-recursive] Error 1


if i install the RPM's again and you can solve the problem it would be great.
0
 
LVL 1

Author Comment

by:Jonza
ID: 8110471
you suggested to do a find and check what is inside that .err

well here:
-----------------------
[root@sailio lib]# more /var/lib/mysql/sailio.kcl.fi.err
030311 14:40:54  mysqld started
030311 14:40:54  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:40:54  Do you already have another mysqld server running on port: 3306 ?
030311 14:40:54  Aborting
030311 14:40:54  /usr/sbin/mysqld: Shutdown Complete
030311 14:40:54  mysqld ended
030311 14:41:04  mysqld started
030311 14:41:04  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:41:04  Do you already have another mysqld server running on port: 3306 ?
030311 14:41:04  Aborting
030311 14:41:04  /usr/sbin/mysqld: Shutdown Complete
030311 14:41:04  mysqld ended
030311 14:41:36  mysqld started
030311 14:41:36  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:41:36  Do you already have another mysqld server running on port: 3306 ?
030311 14:41:36  Aborting
030311 14:41:36  /usr/sbin/mysqld-max: Shutdown Complete
030311 14:41:36  mysqld ended
030311 14:41:44  mysqld started
030311 14:41:44  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:41:44  Do you already have another mysqld server running on port: 3306 ?
030311 14:41:44  Aborting
030311 14:41:44  /usr/sbin/mysqld-max: Shutdown Complete
030311 14:41:44  mysqld ended
030311 14:45:07  mysqld started
030311 14:45:07  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:45:07  Do you already have another mysqld server running on port: 3306 ?
030311 14:45:07  Aborting
030311 14:45:07  /usr/sbin/mysqld-max: Shutdown Complete
030311 14:45:07  mysqld ended
030311 14:45:10  mysqld started
030311 14:45:10  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:45:10  Do you already have another mysqld server running on port: 3306 ?
030311 14:45:10  Aborting
030311 14:45:10  /usr/sbin/mysqld-max: Shutdown Complete
030311 14:45:10  mysqld ended
030311 14:45:18  mysqld started
030311 14:45:18  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:45:18  Do you already have another mysqld server running on port: 3306 ?
030311 14:45:18  Aborting
030311 14:45:18  /usr/sbin/mysqld-max: Shutdown Complete
030311 14:45:18  mysqld ended
030311 14:46:04  mysqld started
030311 14:46:04  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:46:04  Do you already have another mysqld server running on port: 3306 ?
030311 14:46:04  Aborting
030311 14:46:04  /usr/sbin/mysqld-max: Shutdown Complete
030311 14:46:04  mysqld ended
---------------------------
and ps doesnt show any running mysql programs.. how do i check if that port is available and not used?
0
 
LVL 1

Author Comment

by:Jonza
ID: 8110488
cant find my.ini / my.cfg or mysql.sock files anywhere tried with find and locate
0
 
LVL 15

Accepted Solution

by:
VGR earned 100 total points
ID: 8111117
**AS I said before** it ***seems*** that you already have a mysqld process running : (that was the "ps -aux" suggestion above)

030311 14:46:04  mysqld started
030311 14:46:04  Can't start server: Bind on TCP/IP port: Address already in use
030311 14:46:04  Do you already have another mysqld server running on port: 3306 ?
030311 14:46:04  Aborting
030311 14:46:04  /usr/sbin/mysqld-max: Shutdown Complete
030311 14:46:04  mysqld ended
---------------------------

It's very clear.

Try to look in /etc/rc.d stuff if there is no mysqld launcehd "by surprise", and for testing purposes just kill it (the mysqld PID)  and run safe_mysqld manually.

Anyway, if your mysqld is launched, then try to check your privileges by issuing :
mysql --user=root --password=yourrootpassword

You should be given entry. If not, problem... of rights (GRANT... flush privileges) ... or initial root password unset...

0
 
LVL 1

Author Comment

by:Jonza
ID: 8117380
yes, thanks it works fine!
But one more thing before i accept your answer..
Tell me how can i conf my mysql server so that i can access it from outside.. like with mysqlfront program..
where do i define that hostname and so on...
0
 
LVL 1

Author Comment

by:Jonza
ID: 8117494
and why cant user mysql add databases but root can?
where are the priviledges
0
 
LVL 1

Author Comment

by:Jonza
ID: 8117504
table user
0
 
LVL 1

Author Comment

by:Jonza
ID: 8117555
got it to work from outside and privileges are ok, thanks VGR =)
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question