MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
38 views

choose Username or ID as primary key? [duplicate]

my sites dont need use ID at all, then I am trying to manage user by username. Assume my sites is abc.com, then access to user profile by URL: abc.com/user1 So if you want to view all info of that ...
0
votes
1answer
234 views

MySQL: Transaction and Deadlock

I have table "tbl_data", where have a lot of rows (3 - 5 million). I have JAVA (*.jar) module from which I INSERT/UPDATE data into this table. If I start *.jar file (for example, "run.jar") and after ...
1
vote
2answers
23 views

MySQL returns floats rounded

> CREATE TABLE test(foo FLOAT); > INSERT INTO test VALUES(1.2899999); > SELECT * FROM test; +------+ | foo | +------+ | 1.29 | +------+ While it's obvious that FLOAT is not a precise data ...
1
vote
2answers
30 views

Optimal indexing for SELECT (mysql)

What indexes would you recommend for the following select (and why)? Keep in mind there can be tens of millions of rows. SELECT * FROM mytable WHERE md5 = ? AND created_at >= ? AND created_at ...
1
vote
1answer
22 views

trying to understand table size

Can somebody help explain the "data_length" of the table? Why is it so big in my example below of a table with just one column and one row? mysql> create table `network_type` ( `id` int(11) NOT ...
1
vote
0answers
39 views

How to create the database for akinator clone? (github/projects/akinator) [on hold]

On sourceforge (http://Sourcecode.net/projects/akinator) I found a clone from akinator (an algorithm for finding a famous person or character via yes or no questions). From there I got the php files ...
0
votes
1answer
22 views

MySQL Workbench is broken, is there another free, crossplatform tool I can use? [on hold]

I recently updated mysql-workbench-community to latest version 6.2.4 from 6.2.3, I now longer able to use it at all. I created several bug reports: MySQL Bugs: #75012: error while loading shared ...
0
votes
1answer
22 views

Duplicate entry error for unique key that doesn't exist

I have a model that had the following fields: +----------+----------+ | username | password | +----------+----------+ | AAA | *** | | BBB | *** | | CCC | *** | ...
-5
votes
0answers
32 views

How much space does database takes to store twitter data? [on hold]

Context I am going to collect twitter-data(user,s followers, timestamp, content, url and Hashtags) weekly and it continues for an year. I have a total of 160 hash-tags, and I will be creating an ...
0
votes
1answer
16 views

MySQL 5.6 Datetime Range

According to MySQL 5.6 doc, the supported range for datetime data type is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. But when I tried inserting values that are earlier than '1000-01-01 00:00:00', ...
0
votes
1answer
122 views

Quickly etablishing if a remote MySQL connection is valid using PHP

I have a hosted website (Namecheap Pro shared hosting) that connects to a remote MySQL database using a read-only user privilege. This remote DB is updated by a separate system. The website works ...
0
votes
1answer
40 views

How to call a windows program in mysql prompt in windows

I want to call an OS level commands from mysql prompt within Windows command line tool. In Unix* there is a system command available to execute OS commands within MySQL prompt. Any way of dong the ...
0
votes
0answers
20 views

Many transactions are getting stuck in the “cleaning up” state - what could cause that?

I'm trying to track down a locking issue, and found via SHOW PROCESSLIST that when the queries in question are waiting for locks and timing out, there are no other queries active in the process list. ...
0
votes
0answers
15 views

MySQL multi masters with replicas

Currently I have a Master-Master setup, however there is a need to create replicas servers in geographical areas. I am trying to figure out the best method to handle this. The kicker is not all ...
2
votes
3answers
52 views

How to dump only the MySQL database structure? [on hold]

I am trying to take dump of MySQL database structure using the following commands: mysqldump -d -h localhost -u root -p databasename > dumpfile.sql mysqldump -d -h localhost -u root -p database ...
0
votes
1answer
70 views

NDB Cluster seems to ignore foreign_key_checks=OFF

According to MySQL documentation on the local foreign_key_checks variable Beginning with MySQL Cluster NDB 7.3.2, setting this variable has the same effect on NDB tables as it does for InnoDB ...
0
votes
2answers
144 views

How to select the latest record of each hour in a day

I want to select the latest record of each hour in a given date, based on the datetime column 'reading_on' in my table , what is the best way to do it. I already tried group by HOUR(reading_on) with ...
0
votes
1answer
34 views

dumping the database from Linux to Windows in Mysql

I have MySql db on Machine A , I have Mysql credentials. And accessing this MySQL from machine B which I have crdential's. But I couldn't take mysqldump from Machine B. Please help me. machene B is ...
1
vote
1answer
504 views

Simple MySQL table copy from one server to another?

this question has kindof been answered in a number of ways. Nothing that quite fits the bill (as far as I understand it). I have MySQL Table X on Server A. I would like an exact copy of this table, ...
0
votes
0answers
8 views

Deploy existing ms access file with forms as web application

We are using the following: a ms access file with local tables remote tables which are connected through the odbc connector to a external mysql database with many forms When using the ms access ...
0
votes
1answer
93 views

pt-table-checksum - Verify MySQL replication integrity

export/import: $ mysqldump -h6dhdbm01 -p clee2 users > 6dhdbm01-clee2.users.sql Enter password: $ echo $? 0 $ mysql clee2 < 6dhdbm01-clee2.users.sql $ echo $? 0 $ pt-table-checksum: $ ...
0
votes
2answers
25 views

mysql.sock not found on CentOS 7 machine

I am getting the following error when I try to log into mysql from the CentOS 7 terminal of the machine where mysql is installed: ERROR 2002 (HY000): Can't connect to local MySQL server through ...
0
votes
2answers
769 views

How to fix slow LIMIT queries with big offsets without heavily rewriting them?

Imagine a very basic example of your average discussion board. For example: CREATE TABLE threads ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(100), PRIMARY KEY (id) ) CREATE ...
0
votes
1answer
990 views

How to perform a while loop on the query result

I created a trigger AFTER an UPDATE of a column in a MySQL database. When the trigger detects a certain value, it should perform some actions. This is what I have at the moment and is working fine. ...
0
votes
2answers
172 views

mysql need help optimizing query

I have a table containing servers logs, and another table containing rules to match certain and drop them. The logs tables contains around 1 million rows, and there are about 20-30 rules. The ...
0
votes
1answer
24 views

Update records that match like regex from another table

I have two tables - ProductCategories and Products ProductCategories --- productid categoryid 1 2 3 4 Products -------- productid productname 1 Apple 2 ...
0
votes
1answer
44 views

GROUP BY Returning Different Totals

I have two very similar queries that are returning different totals. The first query, where the total [of subscription_payment.price] is calculated with PHP (and verified in Excel), is the same query ...
0
votes
1answer
50 views

Can I lose data if I use InnoDB? [on hold]

During a power failure, is it possible to lose data if I use InnoDB? I remember reading such things.
1
vote
2answers
971 views

ERROR 1166 (42000) at line 65203: Incorrect column name ''

I have a big snapshot database size is about 44GB in mydata.sql. When I run it overnight, it show this error message: $ mysql -u root < mydata.sql ERROR 1166 (42000) at line 65203: Incorrect ...
0
votes
1answer
112 views

Add partition works but not the drop partition

We have set an event as below. What we notice is that the add partition is working well as we can see on a daily basis the partition list is growing but the drop partition is not working well any ...
-1
votes
0answers
15 views

What is the difference between MySQL Innodb log files and MySQL binary logs? [duplicate]

I know that this question might sound a little dumb but I want to know exactly what is the difference between those 2. I know that the binary logs (log-bin variable) are used mostly for replication ...
-1
votes
2answers
91 views

Can you store PHP code in mysql database?

I'm creating a codex that will store example of functions and examples on how to use functions. Can I store this information in a database? Also, is there a proper way of displaying code on a page?
0
votes
1answer
4k 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'@'%') ...
1
vote
1answer
20 views

MySQL slave replication permission error

I am having a rather frustrating issue. I have granted replication client to a user on the slave instance of MySQL. I can login using the username and password. I can exectute "SHOW SLAVE STATUS;" but ...
0
votes
1answer
12 views

MySQL ORDER SELECT based on a score

I have a table 'member' and want to be able to search the table and order results by relevance. I have a single string to search on and want to search multiple fields. Example, given_name and ...
0
votes
1answer
18 views

How to generate unique Auto increament id field across multiple data centers

I have multiple mysql servers deployed in three different data centers. Now my database has few tables with Auto increment id column. I want these columns in all three data center must have unique id ...
0
votes
0answers
21 views

Slow queries while using views in MySQL

We have MyISAM tables on MySQL 5.5 and there is this select * from theView where serial_number = 'QWE12345' or select * from theView where user_id = 1234 kind of queries when searching. When I ...
0
votes
1answer
172 views

MySql - is possible that performance issues are caused by dynamic SQL?

We have this MySQL SP, which uses dynamic SQL. It seems it does NOT perform well under load. It is possible that this SP becomes slow under load because it uses dynamic SQL? Can dynamic SQL cause ...
0
votes
2answers
19 views

How do I figure out what is consuming space in my Zenoss DB (mysql)

I have been running Zenoss 4.2 and the filesystem has never exceeded 20gb. In the past 3 days it has shot up to 90gb and I am almost out of disk space. It appears the used space is all in ...
0
votes
2answers
430 views

Can't get mysql running

After canceling an Ubuntu upgrade, Mysql refuses to start. this is what I get when I try to run it : $ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket ...
0
votes
0answers
20 views

mysql replication not working [on hold]

I have a problem with mysql replication which I've set up almost 2 month ago .. Here are the snapshots from phpmyadmin : http://i.snag.gy/xrEzW.jpg http:/i.snag.gy/Pa0Uo.jpg ( first problem ...
5
votes
2answers
4k views

Taking mysql dump from another machine

I have MySql db on Machine A , I have Mysql credentials. And accessing this MySQL from machine B which I have crdential's. But I couldn't take mysqldump from Machine B. Please help me. Both ae Linux ...
0
votes
0answers
16 views

UPDATE & DELETE multiple rows with an array for the id

I wan't to check for challenges a user's team posted that have not been excepted after 1 day, then autorefund the user's team back there credits, and then also delete all the challenges. So far here ...
1
vote
3answers
41 views

How i can export just structure of mysql database

I use ubuntu 14.10 Phpmyadmin I have ''big'' mysql database, 900mb, I need just structure of this database, how i can export just database structure/empty database without remove data or download ...
0
votes
0answers
15 views

How to configure Mysql database for highavailability and failover? [duplicate]

I have a web application written in java with Mysql database. I want to ensure high availability of my database server, hence i have configured master-slave replication mode. All my reads goes to ...
0
votes
2answers
18 views

Large long-running reporting queries are causing very slow new mysql connections

Usually, mysql's connecton time is in the 0.001 second range. However, when I run a large reporting query (that spans multiple tables with aggregates), I get tons of warnings saying that new mysql ...
1
vote
2answers
2k views

Error while importing a “.sql” file in database

I am trying to import a .sql file in to my local database. whenever i type the command to import the file, I get an error ERROR at line 1: Unknown command '\S'. This is the first line of the sql file ...
2
votes
1answer
181 views

MySQL server connections capped at 1013

For the last few days I've been trying to figure out why my MySQL read slave servers are capped at 1012+1 (+1 for the superuser) connections when I have the max_connections set to 5000. It seems that ...
0
votes
0answers
14 views

ERROR 2013 (HY000) When long string data managed

This is my first question on this community, I'll explain the situation: I have a server with PHP and Mysql on it, on that server I have a wordpress blog. Lately i've been receiving a lot of spam ...
0
votes
2answers
134 views

Dealing with data stored as arrays in a MySQL DB

So I know storing arrays in a DB field is wrong and would never do it myself, however a 3rd party plugin my company is using stores data in an array and I was wondering if you could help me try to ...