newbie seeking help with initial mysql installation
Linux - SoftwareThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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:
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.
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.
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...
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.
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:
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-22.214.171.124' 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.
hrrmmm...This is what I get after running these commands:
rpm -qa | grep -i mysql
rpm -ql MySQL-server-4.0.12-0
package mysql-server-4.0.12-0 is not installed
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?
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
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.
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:
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:
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?
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.
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,
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.