MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

2
votes
1answer
233 views

mysql query doesn't work inside a stored procedure

this is my stored procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `isUserValid`(IN `facebookId` VARCHAR(20), IN `userAccessToken` TEXT) NO SQL COMMENT 'check if user is valid. return ...
0
votes
1answer
15 views

What impact do queries have on a server's resources?

This is a really ignorant question, but I'm wondering what impact queries have on a server's resources in general and can't seem to find a straight answer through searching. For example, suppose a ...
0
votes
2answers
176 views

Need Help maintaining multiple databases for a multi-tenant application?

i need some information about multiple databases for a multi-tenant application ? I am working on a project in which we are maintaining separate database for every company? The Companies Database ...
0
votes
1answer
231 views

Transpose MySQL rows as column names - DYNAMIC

My goal is to be able to calculate the time difference between the ticket timestamp being created and closed and if reopened Add time from being reopened to closed again etc.. I have an existing mySQL ...
2
votes
0answers
25 views

After restarting Mysql replication, Slave commands are executed

up vote 0 down vote favorite I have a Mysql Master Slave Replication which is working fine. Unfortunately I got some serious problems on my slave and the only chance I saw was to restart the whole ...
0
votes
1answer
339 views

MySql one time event never runs?

Please have a look at below events 1) create EVENT Test1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 20 second ON COMPLETION PRESERVE ENABLE DO ... 2) create EVENT Test2 ON SCHEDULE EVERY 20 ...
0
votes
1answer
23 views

Creating Database Tables for Reviews functionality that incorporates Tags/Categories

I'm wanting to create some simple website functionality through a little database idea I have in order to give myself the ability to create/retrieve customer reviews based upon tags/categories. More ...
2
votes
1answer
307 views

InnoDB forum DB design and Composite Primary Key (Cluster Primary Key)

I am designing forum database using InnoDB and got few questions , Could any one please help me to clarify them? Posts and Comments table design below CREATE TABLE `my_posts` ( `forum_id` ...
0
votes
1answer
141 views

Does “Connect” statement for every query indicate broken connection pooling?

there's only one client application running queries against a MySQL instance. After enabling MySQL's general query log (configured to log every query) I noticed that every query starts with a ...
0
votes
1answer
16 views

Should I exclude mysql database from multi master replication?

Running mysql in a two master replication setup. There are many databases and they are all replicating correctly including the mysql database itself. Is it safe to replicate mysql or should I exclude ...
3
votes
3answers
51 views

How does like query work with indexed table

I am working in Spring-java and mysql. I have to query the table of size 100k records. Table has say 10 columns. And In my sql select query I have to make like queries with %text% search on say 4 ...
1
vote
1answer
20 views

MySQL - stay in cache priority for queries

Is there a way to tell MySQL that some queries has highter priority in cache and mustn't be popped out until it's data become invalid? The problem is that innodb cache size is rather small and data ...
0
votes
1answer
23 views

MySQL partitioning table by date and hour

I have a table with a timestamp field. This table will have millions of rows every day so the idea is to create partitions by date and hour. Every day I will delete partitions older than 10 days and ...
6
votes
3answers
13k views

Converting XML to MySQL tables

I have a large XML file in the following format and I need to convert this file into a MySQL table. Please let me know how can I accomplish this? ~~~~~~~~~~ <host starttime="1392325468" ...
1
vote
2answers
30 views

MySQL Duplicate entry for a greek word

I have a column which is unique and when I add Αγάθη and Αγαθή (which are different) it says #1062 - Duplicate entry 'Αγαθή' for key 'word'. My collation is set to utf8_general_ci. Is there any ...
3
votes
3answers
496 views

What kind of hardware/software config should I look at for a MySQL database with 10,000 plus tables

I am looking at rolling out a CMS system that will require the creation of around 10,000 tables within the primary MySQL database of the system. The database will be the data store for several ...
0
votes
0answers
37 views

Good way to harmonize data from different databases [closed]

I have three databases (an access database with user data in-house, a MySQL database of a data provider also with user data but stored in a slightly different structure (e.g. different field names or ...
1
vote
1answer
40 views

Dump All Databases in MySQL - Fails on mysql and performance_schema

I have had two attempts at dumping all databases but both have failed, one with the mysql database and then with the performance_schema database. The precised errors are:- 11:01:01 Dumping mysql - ...
0
votes
1answer
26 views

Server has antivirus. Do I need to enable external locking on MySQL?

From MySQL docs: If you only read tables with other programs, external locking is not required Assuming the bytes of MySQL files does not match viruses, the antivirus will not change the ...
1
vote
2answers
220 views

How to duplicate related rows

Tables: Payments with auto-increment ID and one-to-many relationship to Projects such that one payment (say £10) has two records in Projects allocating the £10 between the projects. Now next month, ...
0
votes
1answer
412 views

Strange Locking issues while playing back logs via percona playback

Problem while replaying logs I am in the process of benchmarking a new DB node (specs at the end) and have run across some strange behavior: As described here i: Created a dump (innobackupex ftw) ...
0
votes
1answer
615 views

#1044 - Access denied for user '#username'@'10.%' to database '#database'

I'm trying to connect my webpage to mySQL with ipage hosting. When I copy the snippet: <?php $link = mysql_connect('username.ipagemysql.com', 'username for mySQL', 'password for mySQL'); if ...
2
votes
1answer
3k views

statistics State in MySQL Processlist

I have a busy MySQL Server having query SELECT sys_sess_state, index_state, timeout_lvl, last_queued_dt, last_polled_wait_dt, create_id, create_dt, modify_id, modify_dt FROM PQR_AM_SYSTEM_SESSION ...
3
votes
1answer
760 views

Insert Speeds for large batches

In my application, my INSERTs seem to be taking a major chunk of the time. I have a large number of objects in memory (~40-50,000) which i want to insert into a table. Lets take a sample table ...
1
vote
1answer
41 views

MySQL running fine while data files (disk) are not present. Data folder nowhere to be found

I'm running MySQL server 5.6 on Windows 2012 R2, and since the installation didn't go as planned, I had to re-install it to change the data directory path. The installer for some reasons never gave ...
0
votes
1answer
1k views

MySQL PDO Cannot assign requested address

Can someone help me with this error? [08-Apr-2013 17:44:08 Europe/Berlin] PHP Warning: PDO::__construct(): [2002] Cannot assign requested address (trying to connect via tcp://****:3306) in ...
0
votes
0answers
13 views

Creating a Views on an non-relational table, can't rotate

I have a table that is set up similar to this. id | key | value1 | value2 | value 3 01 | fname | "john" | null | null 01 | lname | "doe" | null | null 01 | bday | null | YYYY-MM | ...
0
votes
1answer
129 views

MySQL-How to find that value in a column is subset with all other values in same column multiple time

I have a table named as Team where table contain 3 column (ID,Team,Task). Its datatypes are (INT,VARCHAR(255),INT). Below you will find a sample table where I would like to perform the query on column ...
0
votes
0answers
14 views

How do I force MySQL to write the databse into the data files in the disk? [duplicate]

I'm running MySQL server 5.6 on Windows 2012 R2, and since the installation didn't go as planned, I had to re-install it to change the data directory path. The installer for some reasons never gave ...
0
votes
1answer
6k views

Database user specified as a definer

I have a view in my database. problem is below Error SQL query: SELECT * FROM `lumiin_crm_prod`.`v_contact` LIMIT 1 ; MySQL said: 1449 - The user specified as a definer ('lumicrm'@'%') ...
0
votes
1answer
23 views

Automatically purging binary logs

I'm currently trying to create an scheduled event on MySQL to purge binary logs every week. The create event statement is as follows: CREATE EVENT purgebinlogs ON SCHEDULE EVERY 1 WEEK STARTS ...
1
vote
3answers
32 views

Can I remove the middle slave in a MySQL “master -> slave -> slave” setup?

Let's say I have the following setup: Master -> Slave1 -> Slave2 I would like to remove the middle slave, Slave1, and have the following: Master -> Slave2 My gut is that I can do the following: ...
0
votes
1answer
17 views

“show procedure status” displaying the non existing databases stored procedures in mysql server

i have taken a mysql server backup using mysqldump and imported the backup file in another mysql server.Import failed because of disk full issue. Only 11 databases are created out of 15 . when i issue ...
0
votes
2answers
33 views

case statement when grouping?

I have data that contains multiple games, each game would have several users picking it and they would all be grouped into a single week. At the end of that week I evaluate the results and assign a ...
0
votes
1answer
23 views

No records in Mysql.func table even though there are stored functions in server

When i am creating a user defined function in one of my mysql server, it's not creating any row in mysql.func table . Even though i have multiple functions in my mysql server , this table is empty . ...
9
votes
3answers
681 views

Is a 5+ column primary key bad for large (100 million+) table?

I was reading about some real life DB issues, and one project had a 100 million row plus table that had 5 columns as its primary. I'm thinking this is bad, but can anyone tell me exactly why? EDIT: ...
1
vote
1answer
567 views

Cannot create foreign key on 2 VARCHAR(45) columns in MySQL Workbench 6.1

I'm trying to create a foreign key. The columns in both tables are VARCHAR(45) and neither is a PK, however I keep getting this error message: It is saying the PK of reference table is INT, which ...
1
vote
0answers
24 views

Configuring slave from EC2 master to Amazon RDS slave

I am configuring replication from EC2 master to Amazon RDS instance. After starting the slave, I don't see any errors but I see slave_IO _thread is connecting. Master version:5.6.23 Slave ...
1
vote
3answers
47 views

Special function slow in where but not in select

I have kind of a special problem using a levenshtein algorithm in MySql. But I don't think that it's special for levenshtein. This query: SELECT *,levenshtein(word,'Facbook') FROM Words WHERE ...
1
vote
1answer
972 views

MySQL: Which join is better between left outer join and inner join

Which join is better peforming if all of them provides the same result? For example, I have a two tables employees(emp_id,name, address, designation, age, sex) and work_log(emp_id,date,hours_wored). ...
0
votes
0answers
20 views

MSDASQL returned message “ Key column information is insufficient or incorrect. Too many rows were affected by update”

Here we had two database one is SQLServer(retrieve and store attendance info) and MySQL(query from SQLServer and store as backend of PHP codes) Could you help to check and define what's the exact ...
0
votes
1answer
199 views

MySQL crashing randomly

We have a sever running a website Joomla 2.5. We are facing frequent mysql crashes that occur when website has medium visitor load like a few thousands. It appears that mysql consumes more memory and ...
0
votes
1answer
39 views

MySQL Workbench not showing stored procedures that I have created

I have a simple stored procedure that I have just created. I have applied this script to my database This script shows up in the my list of stored procedure However, when I restart MySQL ...
1
vote
1answer
228 views

I need advice on these queries

could you help me optimize these queries? here are queries, please note that you see something like OR 1=1 OR those are values I pass via php and may change. query#1: SELECT posts.status, ...
3
votes
4answers
655 views

MySQL replication - slave update

I have a master slave setup of MySQL and my question is that if I make any changes in the slave database: 1. Will it mess up the sync in any way 2. Will the changes get overwritten from the master ...
0
votes
2answers
37 views

Is this query supposed to be slow?

Select * from (select tmp.userid userid, tmp.username ,tmp.likescore+tmp.commentscore+tmp.sharescore+tmp.tagscore+tmp.userscore+tmp.lsharescore+tmp.friendscore as score from ( SELECT ...
0
votes
1answer
24 views

Who has deleted MySQL user from management console?

How can I find who has removed a SQL login from MySQL instance? Checked event viewer but cannot find anything.
0
votes
1answer
390 views

Mysql closing immediately after new installation

I am using mysql as an backend for my webapp ,the software ran without any glitch but today it gave unexpectedly ERROR:2003 i tried many solution on the internet but none worked. so reinstalled the ...
0
votes
1answer
149 views

MySQL 5.6 replication causes 'waiting for table lock'

All of the sudden queries on slave server stopped with status "Waiting for table level lock" I restart mysql service and stop replications and locking does not show up anymore. Once I turn ...
-2
votes
1answer
51 views

any advantage or disadvantage to have mysql 5.6 on a linux server over on a window server [closed]

i am planning to decide to use mysql5.6 on a window server 2012 or a linux server. Can someone gives me some general advises between the two?