Questions tagged by "mysql"


0.3
 bounty
1
answers
Error: The user specified as a definer ('root'@'%') does not exist
10 years ago • lampego1@qrid
When I tried to execute procedure in MySQL database I got this error: The user specified as a definer ('root'@'%') does not exist Maybe someone has seen this error too?
0
 bounty
1
answers
How I can make backup DB of MySQL Server in Linux?
10 years ago • lampego1@qrid
I need to make daily backuping for MyDBs. I have MySQL server installed in Ubuntu 12. Please write a script if somebody knows :) Thanks.
0
 bounty
1
answers
How can I reset root password for MySQL
10 years ago • lampego1@qrid
I have installed MySQL server in Ubuntu 12.04 and I forgot password for user named root. How I can reset password for this user? Thanks.
0
 bounty
1
answers
PhpMyAdmin - how to get execution time of MySQL Stored Procedure
10 years ago • alex
Problem: PhpMyAdmin tool is showing me query execution time, like "Query took 0.0040 seconds" in the image below) However, when I am trying to run a stored procedure (stored routine), PhpMyAdmin does NOT show me any data about execution time. Question: How can I benchmark the execution time of my stored procedure in PhpMyAdmin without writing any additional MySQL code? Thanks! . P.S. Here is an example on how to benchmark MySQL procedur
Tags: ,
0
 bounty
1
answers
Insert random number of rows into MySQL table using just SQL / stored routine
10 years ago • alex
I need to emulate some test data and so I need to be able insert a random number of rows, let's say from 1 to 100 rows, into MySQL table with the following schema: create table test_data ( id int ,create_date datetime ) id column must be unique b/c it is a primary key. create_date should contain the datetime when the row has been inserted. Please note that table is NOT EMPTY, i.e. it already contains a whole bunch of existing data. I want
Tags: ,
0
 bounty
1
answers
How to select a random row from a table in MySQL?
10 years ago • alex
Let's say I have a table with an integer column called ID being a primary key. It is unique and not-null, but we cannot guarantee it being sequential without gaps. I.e. we may have rows with ID = 1,2,6,7,8 and we do not have rows with ID 3,4,5 etc etc. This is why we cannot just generate a random number and get a row with that corresponding ID. Also we want all rows to have equal chance of being selected, so b/c of the gaps in ID values we ca
Tags: ,
0
 bounty
0
answers
PHP Pagination Last id record
10 years ago • lampego1@qrid
I've the following Pagination code : $rec_limit = 3; /* Get total number of records */ $query = "SELECT count(id) FROM news"; $result = mysql_query($query); if(!$result) { die('Could not get data: ' . mysql_error()); } $row = mysql_fetch_array($result, MYSQL_NUM ); $rec_count = $row[0]; if( isset($_GET{'page'} ) ) { $page = $_GET{'page'} + 1; $offset = $rec_limit * $page ; } else { $page = 0; $offset = 0; } $left_rec = $rec_co
Tags: , ,
1 from 7