Linux RHE5 Startup Script For Multiple MySQL Instances
I have 2 instances of mysql 5.0.67 installed on one server. They are under 2 separate linux accounts (mysql & mysqldev). Each is installed in a non-standard location:
mysql: /opt/mysql/5.0
mysqldev: /opt2/mysql/5.0
Each uses its own data directory:
mysql: /ua01/mysqldata
mysqldev: /ua03/mysqldata
I have ONE /etc/my.cnf file owned & grouped as mysql. The my.cnf file contains the following (commented lines at beginning and end of the file are omitted):
[mysqld_multi]
mysqld = /opt/mysql/5.0/bin/mysqld_safe
mysqladmin = /opt/mysql/5.0/bin/mysqladmin
# Here follows entries for some specific programs
# The MySQL server for STAGING
[mysqld1]
mysqld = /opt/mysql/5.0/bin/mysqld_safe
mysqladmin = /opt/mysql/5.0/bin/mysqladmin
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
# TNC specifics
basedir=/opt/mysql/5.0
ledir=/opt/mysql/5.0/bin
datadir=/ua01/mysqldata
log=/opt/mysql/admin/log/cricket.log
log-error=/opt/mysql/admin/log/cricket.err
pid-file=/opt/mysql/admin/log/cricket.pid
log-bin=/dbarchive/mysql/cricket-bin.log....
View Complete Forum Thread with Replies
Related Forum Messages:
Using Linux Symlinks W/Multiple MySQL Instances
We run multiple instances of MySQL on Linux. Each instance has its own directory structure. Along with other databases, each customer has a 5GB non-updating database that is used only for reference. Currently we have multiple copies of this database, which takes up a lot of disk storage. Since this particular database does not get updated, is it okay to have a single copy of it in a commonly accessible location and give the separate instances of MySQL access to it through symbolic links?
View Replies !
Do I Have Multiple Instances Of Mysql Installed?
I'm running ubuntu 6.06, with a web application called Joomla. Right now our databases appear empty.. while i originally panicked, our web application is running smoothly. I cant figure out why this app would work while it needs mysql. Is it possible this is connecting to another instance of mysql on my server and how would i tell?
View Replies !
Mysql Starts Multiple Php-instances
i have a little problem with a server, running mysql and php. I don't know which php-version i am working with, but the following is the answer for 'mysql --version' mysql Ver 11.18 Distrib 3.23.52, for suse-linux (i686) I know, that this version is not the newest one, but thats not my business. My problem is that i need to execute a script, which starts mysql with this command: mysql -hlocalhost -uuser -ppass db < $update > $update_log whenever this command is running and the 800k $update file is working on the db (a lot of delete and insert statements) there are several php-instances created. So many that they are slowing-down the server, that he is unusable.
View Replies !
Multiple Instances In Another Table
I have 2 tables, and want to compare a field in the first table to multiple in the other I'll try to write it not in pseudo code, to try and explain what I would like to do table1-structure field_need_this | field1 | field2 | ... table2-structure field3 | field4 | field5| ... SELECT field_need_this FROM table1 WHERE field1 NOT EQUAL TO (SELECT field4 FROM table2 WHERE value 'something')*this could for example be 4 values. If field1 isn't the same as any of them I would like the field_need_this
View Replies !
Multiple Instances: Moving Database?
I have two mysql instances on the same box. I would like to move one database to the 2nd instance. Does anyone know of an easy way to accomplish this, preferably without going through the dump/import process?
View Replies !
Multiple Instances :: Pointing To The Same Data Files/the Same Database?
I think I know the answer to this question, but is it possible and safe to have multiple instances of MySQL pointing to the same data files/the same database? I'm guessing that because only one instance can lock the files at any time that this won't work, but some confirmation would be good. I checked the MySQL documentation, but didn't see anything.
View Replies !
Linux Install :: Gcc:cannot Specify -o With -c Or -S And Multiple Compilations
I GET AN ERROR MESSAGE WHILE DOING MAKE OF MYSQL ERROR GOES SOMETHING LIKE THIS: Error while make in Mysql exit 1;fi gcc:cannot specify -o with -c or -S and multiple compilations [make 2]; ****[my_new.0] error1 [make 2]: leaving dir /usr/local [make 1]: *** [all-recursive] Error1 i have tried using 2 diffrent versions of mysql i am build a LAMP configuration on my pc with rhl9 in text mode using CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -mstack-align-double -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
View Replies !
Anyway To Run 2 Instances Of MySQL On The Same Machine?
I was wondering if there is anyway I can run 2 instances of MySQL Server on the same machine, the reason is I have one machine and I want to be able to simulate my program which really talks between 2 systems accessing their own MySQL server datas but I dont have 2 machines with me all the time to do this, it would be great If I could somehow manage this.
View Replies !
Manage MySQL Instances
I am using the version 4.1.12a Windows XP In one customer I found the same version as mine and the ini file has [mysqld] port=3306 server-id = 1 basedir="C:/MySQL/" datadir="C:/MySQL/Data/" and the service is mysqld-nt the question I want to have the same service (mysqld-nt) But different directory of my data datadir="C:/MyData/Data/" How can I do it in the configuration file??
View Replies !
MySQL Startup
i dowunloaded the sources of mysql 4, i compiled it under slackware 9...no errors on configure, make & make install.... I created db (mysql_install_db) and root db password (mysqladmin root -u password) and no errors. The problem is that when i type mysqld_safe & i get the following error : ./mysqld_safe & [1] 5113 root@darkstar:/usr/local/mysql/bin# Starting mysqld daemon with databases from /usr/local/mysql/var 030624 12:33:22 mysqld ended .
View Replies !
Can't Startup Mysql Server
I hv just kill the mysql server process ( by killing the process ID ) , not normally shutdown the mysql server ( mysql stop ) , now the mysql can't start , I also can't find any process related to mysql , except reboot the server , can suggest how to start the server again ?
View Replies !
Mysql Freezes On Startup
I've got a mysql server running on linux. It was working fine until this morning when a customer wrote and told me it was not working. On investigation it had frozen. I stopped and restarted it this is on an fc3 box, i get the starting mysql message but never get a prompt back. I don't see any output in my /var/log/messages.1 file.
View Replies !
MySQL Startup Scripts
Would anyone explain me why the startup scripts check for command line arguments and the contents of /etc/my.cnf right after setting the env variables such as basedir, pid-file and so? if the MySQL code and scripts are expected to be on a specific hardcoded location (yeah, right we could specify this at build time) why bother supporting those variables at all? shouldn't they run parse the command line and defaults file first before setting defaults.
View Replies !
Install And Startup Mysql
I cant get mysql to run on my winXP computer. I have downloaded it and installed , unzipped and run setup.exe and placed it in c:mysql. I type the command to start the mysql server c:mysqlinmysqld --console It opens the console and then the console shows some inoDB commands and the console hangs. I followed the mysql manual and i cant find the answer there is no command prompt and nothing...how do I run mysql?
View Replies !
Mysql Startup Script
I have mysql running on a freebsd box. When the machine boots it does not automatically start mysql, despite "mysql-server.sh-dist" being in the /usr/local/etc/rc.d file. This means that I must run "/usr/local/etc/rc.d/mysql-server.sh-dist start" manually to get mysql to start. Does anyone know of a way to make mysql start automatically when the freebsd box starts?
View Replies !
MySQL Error (*not* 1067) Soon After Startup On XP Pro
I had this problem with 4.0.17 so I upgraded to 4.0.20D, alas with to no avail. I could install the service succesfully with mysqld --install. When I started the service I got a message saying "The MySQL service was started succesfully" but a second later it died. Windows popped up with the usual message "mysqld has encountered a problem and needs to close....blah....blah". The details of that error is as follows: ================================================ szAppName : mysqld.exe szAppVer : 0.0.0.0 szModName : unknown szModVer : 0.0.0.0 offset : 00000000 ================================================ Similar thing happened when I tried to do mysqld --console. I got the "mysqld has encountered......blah" with the following details in the error message: ================================================ AppName: mysqld.exe AppVer: 0.0.0.0 ModName: mysqld.exe ModVer: 0.0.0.0 Offset: 00257865 ================================================ This also applies to another binary which I normally use, max-nt. There's more to the error messages but they're too long to include in this post. Does anyone have any idea what this means?
View Replies !
MySQL Server Startup Issues
For some reason I cannot get my MySQL server to start. It has been running fine until Friday, when we has a strange issue with the Solaris server which it is running on. The server had a few files get their chmod setting messed up and now after fixing that, MySQL won't start. Exerpt from neuro18.err: 040830 15:55:19 mysqld started 040830 15:55:19 Can't start server : UNIX Socket : Permission denied 040830 15:55:19 Aborting 040830 15:55:19 /usr/local/mysql-standard-4.0.20-sun-solaris2.8-sparc/bin/mysqld: Shutdown Complete 040830 15:55:19 mysqld ended ps -ef|grep mysql yeilds no other mysqk processes running. ls -l in /usr/local/mysql yeilds: -rw-r--r-- 1 root mysql 19106 May 13 20:14 COPYING -rw-r--r-- 1 root mysql 8403 May 13 20:14 INSTALL-BINARY -rw-r--r-- 1 root mysql 1937 May 13 19:53 README drwxr-xr-x 2 root mysql 1536 May 13 21:59 bin -rwxr-xr-x 1 root mysql 773 May 13 21:59 configure drwxrwxr-x 9 mysql mysql 512 Aug 30 15:55 data drwxr-xr-x 2 root mysql 512 May 13 21:59 docs drwxr-xr-x 2 root mysql 1536 May 13 21:59 include drwxr-xr-x 2 root mysql 512 May 13 21:59 lib drwxr-xr-x 3 root mysql 512 May 13 21:59 man drwxr-xr-x 6 root mysql 512 May 13 21:59 mysql-test drwxr-xr-x 2 root mysql 512 May 13 21:59 scripts drwxr-xr-x 3 root mysql 512 May 13 21:59 share drwxr-xr-x 5 root mysql 1024 May 13 21:59 sql-bench drwxr-xr-x 2 root mysql 512 May 13 21:59 support-files drwxr-xr-x 2 root mysql 512 May 13 21:59 tests...
View Replies !
Prevent MySQL From Starting At Startup
I'm starting to play around with MySQL. How can I prevent it from starting up whenever my computer starts? It slows down the startup some, and I'm not always wanting to use it. besides, I can start it myself if I need it.I've had a look on Google for theis, and found quite a few results, but they were fo Linux or Unix. I'm ruinning Windows XP.
View Replies !
Mysql Shell Startup Script
When starting up the mysql shell, is there a way that I can automatically run a startup-script ? Specifically, I would like to issue a BEGIN WORK everytime I open up the shell. I tried man mysql, but didn't get any the wiser.
View Replies !
MySQL 4.020c (Windows) Service Startup Error
I installed MySQL 4.0.20C and it works if I started it with mysqld --console However, if I do the following: mysqld --install net start MySQL I got the following error: D:mysql>net start MySQL The MySQL service is starting. The MySQL service could not be started. A system error has occurred. System error 1067 has occurred. The process terminated unexpectedly. Does anyone know what I have don't wrong? I was using Windows XP on my notebook with latest security patches applied.
View Replies !
Instances Automatically
I have 2 mysql servers happily running on the same box. The default server being on 3306 and socket mysql.sock. With a second server running on 3307 with socket mysql1.sock. I can start and stop these fine from the command line. However I can not figure out how to get both to run autmotically on machine start up / restart etc. The default mysql server starts up fine due to the mysql.server script. I have looked into mysqld_multi, which again i can use fine from the command line as a tool to get both running. However I can not work out how to integrate this or any other technique into the actual startup process.
View Replies !
Setting All Instances Of A Value To Zero?
I am writing a basic CMS for a project and i need to be able to set every instance of a value to zero in a mysql database. eg. there are 20 entries, each with the value '1' in the 'default' column. I want to change all of their 'default' values to 0 in one query. How can i do this?
View Replies !
Startup
I have just installed "fedora core 3" with taking everthing that come with it. Now I want to use the "mysql database",but when I run "mysql" command it says "check that database is running". and also "/var/lib/mysql/mysql.sock not found. 1. How to check that database is running or not? 2.How to create mysql.sock file. i have not installed any network card at all.I am workinf on the same pc in which I have installed the "fedora core 3".
View Replies !
Counting Instances In An Array
I have no experience of designing, databases or using script or code but I now find I have to work with an existing database. I have a field in a table called outstanding objectives. It contains data such as Y,12,Y,Y,1,3,Y (Its is an array writen as text to the field by Flash) another field in the same row indicates the number of items in this array, in this case the entry would say 7. Id like to know how to count the number of Y's in the array, then express this number as a percentage of the value in the second field e.g. 4/7 and then write the percentage value into a new field.
View Replies !
One Value, Unknown Number Of Instances
Say I want to have a DB that keeps track of how many pints (of prune juice) I drink (okay, bad example) Each pint will have a size and the amount of time it took to drink, but I don't know how many pints I will have in each instance. Would I have a table for Pint that had pint_size and drink_time, and then a table DrinkingSession that had num_of_pints? But then how would I log the time for each pint? Could I write a DrinkingSession table that had pint1, pint2 pint3, etc?
View Replies !
Select Most Common Instances
request a list of the top X most common entries in a particular field and order from most common to least common ? so if the values were: b,d,a,b,c,b,c,d,a,c,e,d,d,b,d it would return d,b,c,a,e..
View Replies !
Copying Tables Between Instances
copy entire databases between two pcs (1 has MySQL 6 the other MySQL 5) just fine using... mysqldump -u username_a -ppassword_a --all-databases | mysql -u username_b -ppassword_b -h host username_a - Should be the username for the server you are backing up password_a - Should be the password for the server you are backing up username_b - Should be the username for the new server password_b - Should be the password for the new server host - Should be the hostname or ip address of the new server However I just want to copy 1 table in 1 database. The help file shows: There are three general ways to invoke mysqldump: shell> mysqldump [options] db_name [tables] shell> mysqldump [options] --databases db_name1 [db_name2 db_name3...] shell> mysqldump [options] --all-databases If you do not name any tables following db_name or if you use the --databases or --all-databases option, entire databases are dumped. I've tried various versions of #1 ( themysqldump [options] db_name [tables]) but can't get it to work. I've also tried the --tables --tables Override the --databases or -B option. mysqldump regards all name arguments following the option as table names. But couldn't get it to work either.
View Replies !
Ndb_mgmd Can't Startup
I am trying to setup the mysql clustering , I hv followed the manual to setup it , but when start the management server ( ndb_mgmd ) , it pop the below messages , I didn't add any parameter when startup it , could suggest what is wrong ?
View Replies !
Mysqld Startup
I'm using ssh to administer a mysql server, version 3.23.49, which I just installed. The problem when starting mysqld: I type "mysqld" at the shell prompt and hit return, then I get the message "mysqld: ready for connections". But then it doesn't give me back the shell prompt. I can type stuff on the screen, but it doesn't do anything. I've tried Ctrl-C and Ctrl-Z, but that does nothing. Any ideas?
View Replies !
Mysql_4.0.20 Startup
I have compiled (sparc solaris 9 box) and installed mysql 4.0.20 and face the following error. I have copied the startup script to /etc/init.d/mysql and linked it to /etc/rc3.d/S99mysql (as indicated in the sample file). When the system boots mysql doesn't start automaticallyb (rights are OK). Going through the error logs i found that it can't locate the libstdc++..... library which is under /opt/sfw/lib. When I run /etc/rc3.d/S99mysql start after I have logged in as root, mysql starts. Note that the LD_LIBRARY_PATH is setup and the path to the library is included.
View Replies !
Auto Startup...
My VB6 app uses MySQL (5.0), ODBC Connector (3.51). When I start my app manually all is good and that's probably because service and connection is available. If I put my app in the Startup folder to run after the system boots up the MySQL Driver Connect screen pops up and waits for the OK to continue and my app fails because it can't connect to it's database. So what should I do? I can't be there to click on OK, it's too late anyway.
View Replies !
Startup Processes
I'm trying to find out the startup process of mysql. How it starts, the files it loads and daemons it starts etc. Have been looking over the site for ages but cant find much on it.
View Replies !
Update All Instances Of A Field To Default Value
Is there a statement or way in MySQL to update a several fields in a database to the default value? Basically reseting the value with out deleting it. I can go through an manually do that by looking at the number and manually setting it to that but it would be easier to just say: Update table set field=default That didn't work but that's what I'm trying to do. While at it is there any easy way to do it with PHPMYADMIN which is what I manage my DB's with.
View Replies !
Query Does Not Work On Some Server Instances
query: Select * From Students Where C_Name = "XXXXXX" WHen I run this query on 2 of my computers, the result returns no rows. When I run this query on a remote machine hosted by 1and1, with a copy of the same database, the query returns the correct row. The syntax is identical.....
View Replies !
Root Password / Startup
I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine, and I'm new to databases/MySQL. After reading the security section of the manual from http://dev.mysql.com, I added passwords for the 'root' accounts. However, now the startup script (/etc/rc.d/init.d/mysqld) fails. I tried adding: [mysql.server] password=xxx into /etc/my.cnf How do I set the password for the startup script ?
View Replies !
Winmysqladmin.exe Startup Problem
when i start winmysqladmin.exe , i get a message that it could not find the DLL libmysql.dll - but it is in the path, i have even tried copying it to the bin folder with no luck. I just downloaded this update last night.
View Replies !
Handles Of Process On Startup
I'm running Wink23 Server Web Edition with SP2 and MySQL 5.0.51 as a service. When starting the service, my mysqld-nt.exe process has more than 90.000 handles ... right from the start.
View Replies !
Create Startup Variable
trying to create the NOCOUNT variable on MySQL startup. So I edited the INSTALLDIRmy.ini file to include the line NOCOUNT=ON in the [mysqld] section but then I couldn't start MySQL instance with that line in there. Did I do anything wrong? How can I create a startup variable on MySQL?
View Replies !
Mysqld Startup Errors
I get the following message when I try to startup mysqld in the /usr/local/mysql/bin directory. ./mysqld: /usr/lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by ./mysqld) ./mysqld: /usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found (required by ./mysqld) I'm running Fedora core3.
View Replies !
MySQL V4.0 -> Red Hat Linux 9
I'm having great problems trying to install the latest MySQl RPM package onto my Red Hat Linux OS. There is already MySQL v 3.0 pre-installed with the RH Linux distribution disk but I can not seem to get any of the functions working on it. So I have now dopwnloaded the latest version hoping that this will fix the error. I have managed to install the MySQL-shared-compat-4.0.1-0.i386.rpm but i'm getting the following error message when I install MySQL-server-4.0.1-0.i386.rpm : Code:
View Replies !
Mysql On Linux
I am interested in connecting to my MySql database that is running (default install) on FC4. I want to connect to the db with my Windoze machine using MySql Query Browser. Both machines are behind a router; the gateway is 192.168.0.1. The Linux ip address is 192.168.0.50 and the windows is 192.168.0.11 (both static). I guess I need to learn how to determine the mysql host and port when connecting. I thought it would just be 192.168.0.50 and 3306 respectively, it's not working.
View Replies !
|