LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2003, 11:44 AM   #1
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Rep: Reputation: 15
Question newbie seeking help with initial mysql installation


I'm sure this has been athousands times before so please excuse me for asking again, but can anyone assist me some "newbie" type documentation for installing mysql 4.0 on RH 7.3? In particular I'm looking for the simple stuff like:
commands: rpm -???

I downloaded mysql into /tmp/downloads/mysql. When I go to extract this will it install to the necessary locations? I'm sure it will, just wanted to ask.

Post installation methods.
Anyone know of a good app that has mysql, php, acid, snort, apache, etc all bundled into one?

TIA
 
Old 04-04-2003, 12:42 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
To install:
rpm -ivh /tmp/downloads/mysql/package.rpm

For post installation configuration of all your services (I think that was your second question.) I would suggest using Webmin www.webmin.com
 
Old 04-04-2003, 05:18 PM   #3
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Original Poster
Rep: Reputation: 15
OK I've extracted and installed mysql via the following command:
rpm -ivh MySQL-server-4.0.12-0.i386.rpm

and it tells me it's installed to /var/lib/mysql.

Now I navigate to this directory and attempt to start mysql with:
mysql start
and I get error that directtory doesn't exist.

I look at another document and it mentions /usr/local/mysql
Do I need to mv this mysql directory to this location?
What or how exactly should I be installing this? I'm currently logged in as root performing this operation. Should I be logged in as "user" or does it matter? None of the documentation I'm reading seem to specify the login account to use.
 
Old 04-04-2003, 05:25 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
You start mysql as root with
/etc/init.d/mysqld start

You can make it start on boot by making sure it is selected in "ntsysv" (run ntsysv as root)
 
Old 04-05-2003, 07:46 PM   #5
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Original Poster
Rep: Reputation: 15
Cool. Now I'm still a little confused about installing mysql or what directory it should be installed to? As stated earlier, I log in as root, download the mysql rpm to a folder I created under /tmp, /tmp/downloads/mysql/mysqlsrvr. I then mv mysql-server-4.0.12-0.i386.rpm to /usr/local/mysql

I run rpm -ivh mysql-server-4.0.12-0.i386.rpm and it tells me that it's starting mysql daemon with databases from /var/lib/mysql. I don't get this as I'd like for all databases to be placed under /usr/local/mysql because this is where I have the most space and it's a RAIDed partition. Is it possible to
mv mysql /usr/local/mysql without damaging or causing any dependancy problems down the line? I ask because I'm totally new to installing this on a linux box and i wanna document and try to get it right before I screw something up.
Thanks
 
Old 04-05-2003, 10:31 PM   #6
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
Per http://www.mysql.com/downloads/mysql-4.0.html you'll need more than just one RPM. The mysql-server package is part of it but to be able to interact with the server you'll need the client package and for good measure the libraries and header files and similar packages should probably be installed.

Now then, MySQL 2.23.?? comes bundled with RedHat 7.3 For most people that's just fine and will do what they need. The 3.23.x series is being phased out in favor of 4.x though and it's quite stable and fast.

# rpm -qa | grep -i mysql

See what other packages with *mysql* in the package name you already have intsalled. If any of the 3.23.x mysql packages are installed the ones from mysql.com will probably not upgrade them, you'll have to de-install them, preferably BEFORE installing the packages from mysql.com

There will be other packages listed which are NOT part of the mysql distribution itself, programming languages and administration utilities with mysql support, don't delete those.

With an RPM you really have no control over what directory it installs to. It will be in the form of a lot of files in a lot of places though. Do an #rpm -ql package_name to view all the installed files from that package.

A source distribution in .tar.gz format that you extract and compile will commonly install to /usr/local/ but usually not an .rpm package.

You have some partitions that are RAID and some that aren't? Hmm... Not crazy about that but whatever works for you I guess.

By default MySQL stores it's data in /var/lib/mysql and you CAN move this to some other partition and make a symbolic link from the new location to here and it will work, I've done it when I've ran out of disk space in /var before.

One last thing, if you're looking to have any significant amount of data in MySQL and any significant amount of access to it, look at innodb. www.innodb.com and built into most all versions of MySQL for quite a while now. Good stuff...
 
Old 04-06-2003, 12:46 AM   #7
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Original Poster
Rep: Reputation: 15
Thanks for that reply, it was very informative. Couple of things though:
1. Prior to downloading mysql version 4, I was unable to detect any previous versions of mysql on my 7.3 server. I realize now that I was running the wrong command the entire time. I would run rpm -qa | grep mysql and wouldn't get anything in return, which led me to believe there were no versions of mysql installed onto this server. Even now whe I run the command rpm -qa | grep -i mysql I get 4.0.12-0, which is good and leads me to believe there was never a version of mysql 3.23 installed by default onto this server. Even though it appeared to install it during installation.
2. The server has both RAID 1 & 5. /var remains on a single 8gig hard drive apart from the RAIDs. My main goal was to install ALL apps and databases onto this RAID 5 partition, which would release any worries of running out of space. So if I can move that mysql directory from /var/lib to /usr/local/mysql how do I do it with a symbolic link? I've yet to create a smybolic link so any steps outlining this would be appreciated.
3. I thought I read that it was recommended to download the rpm instead of the tar packages of mysql? I'm also totally confused on what mysql packages are supposed to be downloaded and installed. I guess I thought the server rpm would have the necessary components built into it. I didn't see it mentioned anywhere so am I to assume that all of the x86 RPM's you mentioned are the only ones that need to be downloaded and installed? I plan on using mysql to run a small website, nothing fancy to start. So I'm really unsure of what additional features of mysql I need.
4. Since I've already downloaded and installed ver4.0 and mv'd it to /usr/local, do I also need to do the same for the rest of the rpm's I download? Or should I mv mysql back to /var/lib? Lost
Again I apologize if this has all been asked before but I'm trying to get a handle on my particular situation, so any responses are greatly appreciated.
 
Old 04-06-2003, 09:56 AM   #8
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
If you do an 'rpm -qa | grep -i mysql' and only see the mysql-server-4xxx package you installed you _might_ have a hard time using this machine as a web server. Here's all the packages I see on a RH 7.3 box:

# rpm -qa | grep -i mysql
libdbi-dbd-mysql-0.6.4-2
MySQL-client-3.23.56-1
MySQL-Max-3.23.56-1
php-mysql-4.2.1-1
MySQL-devel-3.23.56-1
qt-MySQL-3.0.5-7.14
MySQL-bench-3.23.56-1
mod_auth_mysql-1.11-1
mysqlclient9-3.23.22-8
MySQL-python-0.9.1-1
perl-DBD-MySQL-1.2219-6
MySQL-shared-3.23.56-1
MySQL-3.23.56-1

Two important things, depending on what web programming language you're using, are the php-mysql and perl-dbd-mysql packages. Now this is assuming of course you've not built your own copies of perhaps Apache, PHP and other things from source and don't have the stock RedHat RPMs installed. That's the point though, you don't have the stock RPMs for these types of things installed. What type of web site are you planning, what programming language, what type of access to MySQL, etc... ?

Whether I do RAID 1 or RAID 5 on a server I like to do so more at the disk level, not partition. I like to make all partitions the same.. i seef a drive dies, put a new one in, carry on... If 1 partition is non-mirrored, another is raid1 mirrored, another is raid5 mirrored it justms like it would be harder to manage. But, if you've got a handle on that, no big deal I guess.

Links? do a 'man ln'

What exactly did you "mv" to /usr/local? Do 'rpm -ql mysql-server-4.0.12.0' and see where all the files that comprise that RPM package installed to. You didn't move them all I think? Once the RPM itself is installed you could delete it.. It's like a .zip, once it's extracted and files placed all over the place the actual .RPM file itself is of no use.
 
Old 04-06-2003, 10:00 AM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
I think you want to change the data dir in
/etc/my.cnf
 
Old 04-06-2003, 01:54 PM   #10
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Original Poster
Rep: Reputation: 15
Angry

hrrmmm...This is what I get after running these commands:
rpm -qa | grep -i mysql
MySQL-server-4.0.12-0
rpm -ql MySQL-server-4.0.12-0
package mysql-server-4.0.12-0 is not installed

hrmm.....

Apparently I haven't done squat. So maybe I need to rpm -e and start from scratch.

Looking at the results of YOUR rpm -qa | grep -i mysql it appears as though you have all of these installed on your system whereas I'm at the initial stages of getting this stuff installed. I don't know what happened but I thought I selected ALL options to be installed, which should've included the bundled mysql 3.23 and php.

I go into the service configuration tool and try to start mysql and it, the service configuration too, freezes.
I haven't moved anything other than the mysql rmp to usr/local, which is where I ran it from. Didn't seem to matter as it still installed it to /var/lib.
I plan on setting up a postnuke site handling some basic content, nothing fancy. I only plan on using php, mysql, and apache to handle all of this. I'm also the only person that'll be accessing this server.

ANd as far as the RAIDs go, this server used to run w2k/apache before I decided to try my hand at linux. It has a drive array attached to it with 5 scsi drives. I simply wanted to mirror /boot and combine the space a few of the other drives to create a RAID with some type of fault tolerance. My main thought was simply to have a lot of space available to contain all of my apps and databases. Again, nothing fancy. This is how I had it set up in w2k, so I figured it should work here.

Does installing the mysql tar file present a different scenerio?
 
Old 04-06-2003, 04:41 PM   #11
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
Yes, it doesn't appear to be installed then. Hmm...

With 5 SCSI disks I'd probably set it up as a 4-drive RAID5 array with the 5th as a hot spare. Are all 5 the same size or close? Why not have the OS, all data and everything else in teh system in 1 big RAID5 array and under the protection of that. I'm fairly certain this is something you can not do in Windows without extra hardware/drivers. Bootable C: with software RAID5...

RedHat 7.3 was good but there has been an 8.0 and 9 version since then. MySQL is bundled with all three and is around version 3.23.54 in each. PHP is a similar version for all 3 but 8 and 9 use Apache 2.0.x whcih is somewhat different. Not sure if PostNuke will have a problem with it or not. Might be some info on their site or forums.

Actually MySQL 4.x might be more problematic for it than the newer Apache. I'd recommend sticking with the 3.23.x RPMs that come bundled with 7.3 or RH9 if you happen to upgrade.

Disk space is CHEAP relatively.. I always do an *everything* install, 4 or 5GB used, plenty of space left over with drive sizes these days. Therefore PHP, MySQL and about anything else I might need is already there...

Don't worry, you're learning and that's what matters. Another Linux convert doesn't hurt the cause
 
Old 04-06-2003, 06:05 PM   #12
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Original Poster
Rep: Reputation: 15
Angry ohh this really sucks!!!

I honestly can't believe it to be this hard and troublesome to learn how to install one particular app. The documentation that appears to be written on most of these sites are under the assumption that everyone wakes up knowing something about mysql and linux. I've installed and learned MSsql2000 quicker than the time I'm wasting sitting here rummaging thru sites trying to find "decent" documentation written on this stuff.
MySQL recommends installing the rpms, but fail to mention which of the associated rpms or even what order to install them in.
Another site attempts to walk you thru installing the tarball but the document isn't updated. So you end up trying to wing it and end up with errors. You're asked to run "make" after untarring the file and it returns
make *** No targets specified and no makefile found. Stop.
I can only assume that they are assuming I know what this means. Garbage!!!!!
Let there be one among those monitoring this list that has taken the time to document the "proper" way to setup mysql, or better yet provide me with a triad so that I can install all of this together. I've spent almost 2 weeks trying to get mysql installed and configured alone and have yet to get in to php, and apache. I can't imagine one application or service on the face of this earth that's worth this much time and effort. The least someone could do is update the installation document after the product is updated. That would seem to be common knowledge.

wdingus I do appreciate your time and responses to my post, but this is rediculous.
 
Old 04-06-2003, 06:24 PM   #13
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
I don't know what documentation you're reading but the MySQL installation documentation is quite good. I went to mysql.com, clicked on 'manual', and then clicked on 'MySQL installation' to get to here:

http://www.mysql.com/doc/en/Installing.html

They tell you specifically what packages to use, how to install them, etc...

I suppose I was making assumptions about what you already did or didn't know about rpm and other things previously.

No offense, but if MySQL's installation instructions aren't simple enough you might want to think about paying an admin somewhere to assist and watching/learning during. Just a thought...
 
Old 04-11-2003, 11:25 PM   #14
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Original Poster
Rep: Reputation: 15
OK...Took a week off to get some air. Came back and started anew.
I now type rpm -qa | grep -i mysql and get the following:
MySQL-devel-4.0.12-0
MySQL-Max-4.0.12-0
MySQL-client-4.0.12-0
MySQL-shared-4.0.12-0
MySQL-embedded-4.0.12-0

ps -ef shows me that mysqld-max is running also.

The problem now is that if I attempt to start or stop the mysqld service from /etc/ini.t I get the following errors:
Can't start server: Bind on TCP/IP port: Address already in use
Do you have another mysqld server running on port: 3306?
Aborting
mysqld: Shutdown complete

How can I delete that "other" server that it's referring to? I think this may be the mysql tar file I downloaded and untarred. How can I remove this? I tried rpm -e mysql-standard-xxxx and it tells me that the directory isn't empty. I also tried rmdir -p and it still wouldn't remove this directory. Can some assist me these issues; in particular what commands remove directories? I thought the rmdir -p would do this but I guess I'm wrong.

I'm also unable to get MySQLCC installed via the make command. I don't know if this is a result of mysql not functioning properly, but any response on either of these issues is appreciated.
 
Old 04-14-2003, 08:05 PM   #15
marvc
Member
 
Registered: Aug 2002
Location: GA
Posts: 59

Original Poster
Rep: Reputation: 15
ok...back again with a new question as I'm not getting any responses so I must be wording something wrong.
I've reinstalled mysql 4.0.12. Now the "Post Installation setup and testing" document states to, and I quote,
Quote:
Once you've installed MySQL (from either a binary or source distribution), you need to initialise the grant tables, start the server, and make sure that the server works okay. You may also wish to arrange for the server to be started and stopped automatically when your system starts up and shuts down. Normally you install the grant tables and start the server like this for installation from a source distribution: shell> ./scripts/mysql_install_db
shell> cd mysql_installation_directory
shell> ./bin/safe_mysqld --user=mysql &
I can't find this directory to run this script from. I navigate to /var/lib/mysql and I don't see this install script. Should I be looking elsewhere for this? I also don't see anything under /usr/local, which is where I ran the rpm from. So I'm hoping that the databases will be installed to /usr/local instead of /var.
 
  


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
Newbie seeking help with FTP cdawley4 Linux - Networking 2 07-28-2005 08:02 AM
A newbie is seeking for document about linux programing TruongAn Programming 4 02-21-2005 10:12 PM
Utter newbie seeking OSS project advice EducatedStupid Linux - Software 3 04-06-2004 06:11 PM
MySQL installation newbie Csneeky Slackware 4 05-11-2003 08:34 PM
Real newbie seeking info for learning. DaDdY SnEb Linux - General 5 06-19-2002 05:58 PM


All times are GMT -5. The time now is 03:41 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