MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
7 views

how to create invalid utf-8 characters in MySQL

I'm trying to test some application level ruby methods and how they handle invalid utf-8. I'm trying something like to get invalid utf-8: mysql> update items set header=UNHEX('4D2AFF') where ...
0
votes
0answers
13 views

How to stop ROLLBACK in progress?

How do I stop a rollback in progress. I killed a very long running INSERT INTO table1 SELECT * FROM table2 statement. I want to commit what's already there but I can't since it's rolling back. This ...
0
votes
1answer
217 views

INSERT take too much time

I have in my MySQL DB a few tables Most of the time, I'm only doing INSERT in my db. I have up to 4 connections to the DB, each one inserting into a different table. There cannot be two connections ...
-1
votes
1answer
15 views

mysql server is not starting

mysql server is not starting after modifying configurations key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 query_cache_size = 16M after ...
0
votes
3answers
19 views

Last mysql reboot

Is there a way to check the last restart of mysql server, in global variables or something else ? System : redhat Logging : not activated
0
votes
1answer
35 views

Mysql Group Concat Distinct On One Field While Returning Another

I have a group concat distinct to return a distinct set of user names (user.first_name concatenated with user.last_name with a space separator). I want the distinct to apply on the user_id and not on ...
0
votes
1answer
29 views

Index on 'GROUP BY' with functions

I have a log table. It logs visitor data (time of visit, browser, window size ...). I want to create reports. I use a query like this (MySQL): SELECT COUNT(*) as raw_views ... FROM logs WHERE ...
0
votes
0answers
15 views

PHP My SQL Taking Long time to Insert Record in Table when using Mozilla Browser

Scenario : I am trying to Execute Page which has code to Insert a Record in My SQL Table. Issue : When I am calling this Page from IE/Safari it works well but when I do the same from Mozilla/Chrome ...
1
vote
2answers
1k views

“can't return a result set in the given context” error when calling stored procedure - differences between mysql 5.0 and 5.5?

I have a stored procedure to regenerate leafs (nleft, nright) in simple (id, id_parent) tree. (sample table) When I'am calling CALL EdgeListToNestedSet( 'category', 'id_category', 'id_parent'); ...
0
votes
0answers
33 views

amazon small instance mysql query too slow

I have mysql database with 1.5 millions records with 2 million categories records. when i do query on categories and city where clause it takes 304989 milliseconds. on localhost it too fast. i tried ...
2
votes
1answer
13 views

Purge mysql and it's configuration completely from MAC.

I, by mistake messed up with mysql's only user and the situation is I can't create new user or give more privileges to existing one. Access denied is the error. Only visible db is info Schema So I ...
0
votes
1answer
66 views

Multiple product attribute inventory database design

i have a database to build based on inventory for my shop. this is the current data that i have put into tables this is the package: this is the product attribute this is the table to produce ...
0
votes
0answers
12 views

Loading the databases from previous installation mysql

My Windows OS crashed today. Now I have recovered all the files in Program files/MySQL folder.(I don't have the exported .sql file) With the new installation of MySQL 5.6(same as before), can I get ...
0
votes
3answers
267 views

How to determine the optimal sort_buffer_size?

I read from a sample configuration file which says the following: # Sort buffer is used to perform sorts for some ORDER BY and GROUP BY # queries. If sorted data does not fit into the sort buffer, a ...
0
votes
1answer
35 views

Database Inner join For fetching Records

I have two table in database. Basically these tables contains the question like subjective/objective. I want to fetch the data from these tables table_1 :- ...
0
votes
1answer
175 views

MySQL Replication Master push to Slave

I have two servers that need to be synced. One is online and has a public IP address. The other is internal and has no public IP address - nor is there a way to get it a public IP so that's off the ...
1
vote
0answers
25 views

What could cause waiting for table metadata lock?

I am using a MySQL 5.6 DB with MyISAM tables under FreeBSD 8.3. The main part of code is in PHP, but the problem arises, when I launch the self-written on C++ chat-server. I use the mysql.h for DB ...
0
votes
1answer
82 views

How to automatically Reset Query Cache for improve table cache hit in MySQL?

I have a VPS running CentOS 6.4 and 2.5GB RAM, Intel(R) Xeon(R) CPU. Its MySQL version is Server version: 5.5.35-cell. I have two active wordpress sites and two inactive sites (inactive sites use for ...
0
votes
2answers
103 views

From freelancer to team of two : best way to share/sync db?

I am a webdev. I have just hired a dev. Before that I was alone. Thus, I have to change a bit my organization. I am looking for the best way to develop on the same database (mysql). I am considering ...
0
votes
1answer
44 views

MyISAM : Should I be concerned by these warnings?

I restored some tables from recent Databases backups. Because Im supporting a legacy system that only uses MyISAM tables in their DBs, for backing up I used a little script that pretty much copies all ...
0
votes
0answers
21 views

How can I decrease FULLTEXT initialization time?

I'm trying to decrease execution time of the a query. Using SHOW PROFILE, FULLTEXT initialization takes about 0.3, which is too high. Other values are at normal level. How can I decrease FULLTEXT ...
1
vote
0answers
28 views

How can I normalize and optimize this database before I build it?

I was just given the project of creating a database to store and access information that the various engineers involved in design and manufacturing can use to create updated instructions and load ...
1
vote
0answers
31 views

MySQL fulltext selection performance

I have 1.5M rows in a table. Following is the table create code: CREATE TABLE `jobs` ( `id` INT(8) NOT NULL AUTO_INCREMENT, `job_id` VARCHAR(50) NOT NULL DEFAULT '', `title` VARCHAR(255) ...
0
votes
0answers
15 views

Get tp.address_from and tp.address_to from travel_point table

I'm building a view for get tp.address_from and tp.address_to but I can't get this works. This is the query I'm working on: SELECT `tp`.`address_from` AS `address_from`, `tp`.`address_to` AS ...
0
votes
1answer
23 views

Duplicate Entry Error with PHP When Trying UPDATE

I am checking if a record exists, creating a new record if it does not already exist, and updating otherwise. The SQL works fine in PHPMyAdmin but not through the PHP page. $check_for_id = ...
0
votes
1answer
20 views

MySQL read/write ratio from information_schema.GLOBAL_STATUS

Could you please help me to construct a query to sum specific rows from a table, basically desired output is: +-----------------+----------------+ | Total reads | Total writes | ...
0
votes
1answer
17 views

Extracting the maximum of several subsets and join all maximums in a new table

I have a big table: What I need is to obtain the maximum value for each testname, with different entry and get a new table such as: And then I want to compute the maximum, the minimum and the ...
0
votes
1answer
26 views

Why is my Mysql Query verry slow when selecting a text field

i have a problem with a left join. Tables are myisam. Tables CREATE TABLE `article` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `force_startpage` tinyint(1) DEFAULT '0', `title` varchar(255) ...
0
votes
1answer
32 views

How to find n consecutive numbers in MySql

I have numbers starting from 1 to 50 and then 90 to 200 in my database and I want to fetch 100 consecutive numbers then the result should be 90 to 189. Records in my table are more than 10 million.
0
votes
2answers
2k views

MYSQL 5.5 Fail start Fedora 16

I installed mysql and mysql-server from the repos (MySQL version 5.5). Then tried to start it, but got an error. [root@server]# service mysqld start Redirecting to /bin/systemctl start ...
0
votes
1answer
16 views

pt-table-sync for 3 master servers

We had a mysql multi master with 3 nodes and unfortunately the replication broke. We have some set of tables which has to be in sync with other database servers, so i was looking into Percona-Toolkit ...
3
votes
2answers
157 views

How to optimize a log process in MySQL?

In my project, I have about 100.000 users and can't control their behavior. Now, what I would like to do is log their activity in a certain task. Every activity, is one record which includes columns ...
1
vote
1answer
19 views

MySQL crashes frequently on a Windows server

I have been facing an issue with MySQL crashes since last week. I don't know what exactly is happening. When I look at the Windows logs, I see the following error message: Faulting application name: ...
0
votes
2answers
65 views

Reset of root password not working?

Our previous DBA left and didn't note the root password down, and I've been pressganged into doing part of his job until we can hire someone. So I create a file : /root/mysql.password Inside that ...
0
votes
1answer
25 views

Query to join three tables

I have three tables which I have to join. I'm not a good SQL writer. Can please sombody help me to prepare this using joins: branches ----------------------------------------- branch_id | branch_name ...
0
votes
1answer
137 views

How do I access a result set from a StoredProcedure… in another StoredProcedure

I have a non-trivial SELECT statement and I don't want to write it twice (standard SW development considerations). I want to use the results in two stored procedures. I am imagining something like ...
0
votes
0answers
19 views

MySQL Dump failure in the middle [on hold]

I have a several GB's of MySQL datas,I want to dump those files,As when I tried to dump,it fails in between. It is impossible to start over the process again,Is there any way to start the dump from ...
1
vote
0answers
19 views

Randomizing the Auto Increment in Mysql

We have a database, where we insert data into table whenever we receive an order from our services. We use auto_increment to generate the ID and assign the order with the same. This is usually same ...
0
votes
2answers
49 views

JOIN on three tables is not working

I have these three tables, user, categories and files In users, table I have a column user_id And I have this query that shows all Categories. SELECT `categories`.`category_id`, ...
0
votes
1answer
30 views

Indexes involved in intervals collision detection

Let's assume an hotel booking application wants to display all customers being present between two dates. Starting with a venue table : CREATE TABLE `venue` ( `id` INT NOT NULL AUTO_INCREMENT ...
1
vote
2answers
81 views

Altering table Foreign Keys produces an error (errno:150) (MySQL)

This is the first database I set up so I apologize if my problem is something obvious. I'm playing around with my table design and tried to create some link tables with FKs to avoid redundant data. ...
0
votes
0answers
19 views

DBD::mysql complains “Character set 'latin1' is not a compiled character set”

I think this boils down to "Am I doomed to upgrading mysql hoping the problem goes away?". I've seen a few of the same issues around the internet but with no guidance on a fix other than "Did you turn ...
0
votes
1answer
22 views

MySQL: update field with “x hours xx minutes”using int from another field

We have two fields that hold time data totalTime (int): number of minutes (eg 243) totalTimeDesc (string): normal english representation (eg '4 Hours 3 Minutes') We have a lot of different formats ...
3
votes
2answers
72 views

Find problematic MySQL users and databases

We have a MySQL 5.1 server that is an "open" service: anyone on campus can request a database. As such, we have several thousand databases on this one server. As you might imagine, sometimes one ...
0
votes
1answer
31 views

Last row from a query without Order by

I have something like SELECT var1,var2 FROM table where var3=X AND var4=Y order by var5 desc limit 1; Running this query takes roughly 5 seconds on my database which is far to slow. I was ...
1
vote
1answer
15 views

Can triggers be used to implement automated polymorphic association?

(Apologies for any bad formatting or ignorance of common practices within this community; this is my first question here.) I'm attempting to (re)design a MySQL database for a personal social ...
0
votes
1answer
94 views

slow writes on percona / mariadb server only when replication is running

Hi I am trying to migrate to percona server from mysql 5.6 on windows. In my development machine for percona is running of centos 6.5 which is installed on vmware 5.5 sphere. Our business ...
0
votes
1answer
15 views

MySQL/PHP Returning Blank Error Message

I am using the following code to delete a record. It works fine, but MySQL always returns a blank error message. PHP returns "Error: " instead of "1 Record Dropped". $eventid = ...
0
votes
1answer
17 views

Where mysql writes its log seqeunce numbers and last checkpoint at?

I'm working on developing mysql log collecting system. To do that, I have to collect log sequence numbers from mysql LSN and last checkpoint location. But I have no idea where should Which log file ...
0
votes
2answers
32 views

How do I allow remote mysql access to all users?

I have setup a mysql server on unbuntu. The server hosts websites for my various clients. Hence, I want all of them(and any new clients) to have remote access to the mysql server. How do I configure ...