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 Complete Forum Thread with Replies
Related Forum Messages:
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 !
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 !
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 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 !
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 !
Starts And Ends
--Apple-Mail-2-720579055 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed when I enter: cd /usr/local/mysql sudo chown -R mysql data/ sudo echo sudo ./bin/mysqld_safe & mysqld starts and ends. I am using a Mac with OSX 10.2.4 and have installed 4.0.4 Any assistance would be greatly appreciated! Helen --Apple-Mail-2-720579055--
View Replies !
Field Starts
How do you do a search for checking if the field starts with a certain value. What I am trying to do is search article titles for titles that start with "a" or "b" or "c" etc. Basically like on websites where you can find products by clicking on a list of letters. Do I need to grab all the articles and manually check this or can I do this in MySQL?
View Replies !
Starts With A Number
Is it possible in a query to select all the records that have a number (as opposed to a letter) as the first character in a particular field? If so, how would you word the query
View Replies !
Insert 'http://' Where Row Starts With Www.
I need to insert "[url]http://"[/url]; to the beginning of each row where a URL has been entered as www.anything.com (for example) to the row becomes (http://www.anything.com) I don't know how I can do this without over writting all the current URL's with out the prefix "[url]http://"[/url]; in a URL and whether it can be done.
View Replies !
Auto-increment Starts On Highest Value
When this has been created, the ID has been generated to 2147483647 and when I try and create another record it fails because nothing can go higher than 2147483647 (I think) The auto-increment has been started at 2147483647 no idea why, and from there when I atmysqlt to create another record it will fail because it ascends from that value.
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 !
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 !
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 !
Select Multiple Rows With Multiple Values In A Single Statement
when selecting multiple rows with different values in a certain row.. is this proper syntax? SELECT * WHERE name IN ('hello', 'cookie', 'smile', 'police', 'fun') It seems to work fine, but It came from another SQL version I believe .. not mySQL. Just wanted to double check, or see if there is a more correct way.
View Replies !
Select / Insert Multiple Rows As A Single Row Of Multiple Columns
I have a nice database set up that contains information about orders and the items on those orders. If an order has 10 items on it, I can select the item data which returns 10 rows of data (let's say 5 colums each). Beautiful! Now I find myself needing to satisfy a program that requires all of the data on a single row. I can do this in a higher level language, but if I could accomplish it all in mysql it would be better. I don't need to sum or do any calculations. I just want to select those 5 columns of data about those 10 rows worth of items as a single row with 50 columns. For example, I'd want this: 1-1,1-2,1-3,1-4,1-5 2-1,2-2,2-3,2-4,2-5 To become: 1-1,1-2,1-3,1-4,1-5,2-1,2-2,2-3,2-4,2-5 The first complication is that the number of items on an order is variable, but is always at least 1 and can not exceed 20. The closest I've been able to get is to do something like: SELECT GROUP_CONCAT(item_number,",",qty,","",description,"",",price,",",location_number SEPARATOR ",") FROM items WHERE order_number=12345 This will give me a single text string containing the value content of the INSERT query (which will need to be manipuated outside of the SQL query to pad it with NULL values for the unused items' columns etc).
View Replies !
Select Statement With Multiple Counts/multiple Joins Trouble
SQL SELECT g.group_id, g.name, g.description, g.icon, g.user_id, g.date, u.username, count(c.comment_id) as comment_count, count(v.video_id) as video_count, count(m.user_id) as user_count FROM duo_groups as g LEFT JOIN duo_group_members as m on m.group_id=g.group_id LEFT JOIN duo_users as u on u.user_id=m.user_id LEFT JOIN duo_videos as v ON g.group_id=v.group_id LEFT JOIN duo_video_comments as c on v.video_id=c.video_id GROUP BY g.group_id, g.name, g.description, g.icon, g.user_id, g.date, u.username Will return My current problem with the above statement is with the counts. The count is accurate when only one of the counts is returned. However when more than 1 of the counts is returned the other counts (if they are not 0) will return the same number. For example look at the screenshot above. The first row, all three counts are the same but they are not accurate. They alll point to 8 because there are 8 comments, but there aren't 8 videos or 8 users. Same with the second row. There aren't 2 users only 2 videos.
View Replies !
Joins With Multiple Tables And Multiple Rows
I'm making a good ol' forum, and i have three tables, users, threads and posts. when i query my threads table with a join, i need to access the users table twice to get the username of the first poster and last poster. But how? I can only figure out how to get one or the other. Is my design bad? eg SELECT TopicID, FirstPostID, LastPostID, Replies, Views, Topic, username FROM DiscussionThreads, users WHERE DiscussionThreads.FirstPostID=users.ID ORDER BY FirstPostDT DESC LIMIT 10 .
View Replies !
Select Multiple Keywords From Multiple Tables
am trying to do. I have a database called "members" that contains a table called "Reviews". This table has fields S1, S2, S3, S4, etc. that I want to search for the words ad, advertisement, and promotion. Here is the syntax I came up with that doesn't work: SELECT * FROM `REVIEWS` WHERE S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, XTRA='ad, advertisement, promotion' It would be perfectly fine, if easier, to search all fields in the table.
View Replies !
Can MySql Have Multiple Datadir's ?
we have several dozen clients and it would be nice to have a seperate folder structure for each one, as we zip up data and send it off to them and we can't have the possibility of accidently sending other clients data. We can have a seperate database for each client, but what would be really nice is to be able to have several different mysql "data" folders (one for each client) but have MySql be aware of all of them...
View Replies !
MySql DB Multiple Queries
How well can a MySQL Database handle multiple queries, for example if I had 100 Queries at teh same time from multiple users to teh database, would it crash or anything? On a MySQL Server can host restrict how many queries a DB can receive? Because I'm planing on having "sometimes" multiple queries oen after the others, mayeb even 500 Queries at the same time for different things and different users.
View Replies !
Multiple Mysql Tables
if you take a look at this site , all the info on the page is divided into sections, seperated by blue bars. How could all this info be stored in mysql - would it work to put it all in one massive table, or would there be too much info in the table, meaning that queries would be slow?what would be the best design to hold all this info?
View Replies !
MySQL Multiple User
I am currently working on this simple project. There will be about 10 users for this intranet website. Here is a brief desc. on this project. This Company makes this product that requires an assembly of many components. Now whenever someone puts an order for this product, the required items sometime is not available. So I want to create a MySQL database where users can enter this order no. + required components.What happens if two user try to alter that order at the same time? E.g Order No.1 requires ItemA,ItemB,ItemC. And if someone is altering that Order no.1 and someone else accidently try to alter that Order no.1 at the same time. Will it corrupt the data? What happens next?
View Replies !
Multiple Mysql Processes = Bad?
I am moving my mysql database from one server to another. Server 1 is a dual Intel Xeon 2.4GHz , Server 2 is a dual opteron 246 . Both run Debian, and mysql 4.0.24 . Server 1 only has one mysql process I can see on top , server 2 seems to have a lot more. I did not think that it is very good to have mysql use a lot of different processes, and a quick search on google seems to confirm this. So, are multiple mysql processes something that I should try to avoid ? And if yes : how can I change this ? I do not really see a specific option for this, I'm even using the same my.cnf.
View Replies !
Mysql Runs On A Machine With Multiple NIC.
When Mysql runs on machine with multiple NIC's. Mysql server takes the IP Address that we specify in the configuration file. This IP Address may or may not be a primary IP Address of that machine. So we specify secondary IP Address for the Mysql server. It listens in that IP Address. When Mysql client from the same machine connects to that server, Mysql Client is treated,as if the connection is coming from the different host. i.e. The Rights of the Mysql client will not be same as the rights of user@localhost instead it will be equal to the rights of the user@PrimaryIPAddress. Is this behaviour correct or a bug.
View Replies !
Replication With Multiple Servers In Mysql ?
I want to establish replication between multiple (currently three) servers. Updates/inserts/deletes may happen on all of them. The idea I came up with was to do a "circle"-replication. The problem with this is, that if one server fails the rest may not get updates (until the server is back, obviously). Does anybody have an idea how to establish such a replication in a fail-save manner ? Code:
View Replies !
Replication With Multiple Servers In Mysql
I want to establish replication between multiple (currently three) servers. Updates/inserts/deletes may happen on all of them. The idea I came up with was to do a "circle"-replication. The problem with this is, that if one server fails the rest may not get updates (until the server is back, obviously).Does anybody have an idea how to establish such a replication in a fail-save manner?
View Replies !
Dropping Multiple MySQL Tables
if there's a way to drop multiple MySQL tables with the same prefix. I installed phpnuke and all their tables start with nuke_ .. I want to drop all the tables using phpMyAdmin.. is there a way to drop multiple tables with same prefix?
View Replies !
Looking Up Id That Matches Multiple Values (MySQL)
I have a simple lookup table (MySQL): id1 int 11 id2 int 11 Example data is: id1 / id2 1 / 1 1 / 2 1 / 3 2 / 2 2 / 3 2 / 4 What I would like is to find the value of id1 where the values of id2 match a set of values (like 2, 3 AND 4). How can I get the id1 of 1 returned given a set of values (2, 3, 4) to match against id2?
View Replies !
|