MySQL Server

47K

Solutions

23K

Contributors

MySQL is an open source, relational database management system that runs as a server providing multi-user access to a number of databases. Acquired by Oracle in 2009, it is frequently used in combination with PHP installations, powering most of the WordPress installations.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi Guys,

In my application I use a MySQL-connection. If this connection is not used for a period of time it times out. Is there any way to detect this, because the connection state remains open. Just sending a query to test takes a long time before it times out so I was hoping for a different approach.

Thanks!
0
Hi everyone,
A few days ago i opened phpmyadmin and turned out to give this error
"#2003 - The server is not responding "
-phpmyadmin version 2.9.2
-PHP versin 5.2.1
-APACHE version 2.2.4
Please help me out.
0
Table 1 :  SLOTS
Columns : StdId, StudentName , Slot1, Slot2

Value examples for
Slot1 :  SUN-01, SUN-02, THU-04 etc
Slot1 :  FRI-01, WED-02, THU-03 etc


Table 2 : TIMINGS

Columns :  ClassId, ClassDay, ClassTiming, ClassLocation
FRI-01, FRIDAY, 04:30 - 05:30

Value examples for
ClassId :  FRI-01, SUN-02, WED-04 etc
ClassDay :  FRIDAY, WEDNESDAY, SUNDAY etc
ClassTiming : 4:30 - 5:30, 09:00 - 10:00 etc,

Need to display records from the two tables in this manner
StdId , StdName, Details of Slot 1 (i.e FRIDAY 09:00 - 10:00),  Details of Slot 2 (i.e SUNDAY 09:00 - 10:00)
example :
1 STUDENT NAME , FRIDAY 4:30 - 5:30, SUNDAY 10:00 - 09:00
2 STUDENT NAME2 , MONDAY 4:30 - 5:30, TUESDAY 4:30 - 5:30

So, the  Slot1 and  Slot2 from Table 1 should pick up its related records from Table 2 and display them

Using PHP, mySQL, PDO . ALL fields are VarChar

Please Guide
0
Hi there,
I have a VM hosted in Azure which runs a Bitnami-Dreamfactory VM. During upgrading the DreamFactory libraries accesing the mySQL stopped working.
I am now trying to extract the mySQL database so I can put in a freshly installed VM.
Problem is we can not access the mySQL database. Resetting root password also doesnt work even on safe mode.

If you are familiar with Bitnami-DreamFactory VM and think you can help me extract the mySQL database, please help.
Thank you,
Andres
0
Looking for someone to assist with gathering cpu, ram, hd stats for our Redhat and MySql install. I heard we can pay for this service now. Someone please let me know.
0
I try to replicate my email server db to another server for backup.  When there is an update on the master db, sometimes it will miss data inserting into one of the tables on the slave server. It will add the row but the data inside are all "Null". Then, it will try to add that row again and it will generate the duplicate primary key error which causes the replication to stop. On the internet, a lot of people say to skip the error, but I don't think it is the right way to do it because it will create the inconsistency on the slave db.
0
I need to upgrade an old MySQL Database.  Working on windows 10.  MySQL 5.7.  Older version of MySQL I believe is 1.4.  

I have the files.  They are .MYD, .FRM, and .MVI.

I created a database in MySQL (let's say MyDbase).  I looked for the database to try to copy files in that folder and haven't found it.

Any ideas?
0
Hi Team,

  I have mysql running in a docker container in my centos 6.6. server.  With my docker container  called "mysql",  I create this useful script that copies  my "PATCH_RECORD" table in my niis database daily and it works fine.

docker exec mysql mysql -u root -pmypassword niis -e  "CREATE TABLE patching_`date  +%d_%h_%Y` SELECT * FROM PATCH_RECORD; "

Open in new window


I then have a cron job that runs the script daily so I have daily backups of my PATCH_RECORD table.

Now I need to drop the backed up tables older than 5 days by running another cron job so i don't keep tables more than 5 days old.  I am trying to get the exact syntax for this but can't seem to catch it.  Something like this:

docker exec mysql mysql -u root -pmypassword niis -e  "DROP TABLE patching_`date +%d_%h_%Y -5d`; 

Open in new window


The bash interpreter is interpreting -5d as text so it is resulting in a syntax error.  I tried various combinations of -v, or -d   or putting "-5d" with no luck.

Any help with syntax will be appreciated.
0
I have written the code that submit a form with few details and then its output is viewed onto another page. Problem with the code is that every post goes fine and all the details respective to the posts are being fetched from database properly except image. In case of image only one image is being fetched and else are not. One more issue with the code is that I want images to be stored with a unique randomly generate id or name in userdata/images.
Any help will be appreciated.Here is the snapshot of output
submit.php:
<?php
ob_start();
include ("./inc/header.inc.php");
$fileToUpload="";
if(isset($_POST['link'])) {
    $urlInput=$_POST['urlInput'];
    $fileToUpload=$_FILES['fileToUpload']['name'];
    $title=$_POST['title'];
    $category=$_POST['category'];
    $userid = Login::isLoggedin();
    $filename = $_FILES['fileToUpload']['name'];
    $filetemp = $_FILES['fileToUpload']['tmp_name'];
    $filesize = $_FILES['fileToUpload']['size'];
    $filebasename = basename($_FILES['fileToUpload']['name']);
    $dir="userdata/images";
    $finaldir=$dir.$filebasename;
    move_uploaded_file($filetemp,$finaldir);
    DB::query('INSERT INTO links VALUES (\'\', :urlInput, :fileToUpload, :title, :category, NOW(), :userid, 0)', array(':urlInput'=>$urlInput, ':fileToUpload'=>$fileToUpload, ':title'=>$title, ':category'=>$category, ':userid'=>$userid));
 echo "Link shared successfully.";
}
/*else {
    die(mysql_error());
}*/
?>
<div class="container">
    <div class="col-md-4">

Open in new window

0
need help creating  a custom query to load a play list based on genre using wimpy sql. the program says its possible but I have not been able to.

http://theonlinebeatz.com/Music/wimpySQL/_README_wimpySQL.html#query
0
Greetings,

I need a solution to send a MySQL query to csv file with date format then it needs to be uploaded to a SFTP server for users to retrieve. Currently I have the following:

mysql -u user1 -pP@ssword -hnodes1.aws.com <script1.sql> > test1.csv

So I need the test1.csv compressed with a name and data format or I need the test1.csv produced with as a file name with data format. Please advise.
0
Hello I have query to clacultae the balacy of customers in my SQL
I want   The Previous Balance to be added to current transaction
Result would look like :  Balance = Sale+Hadnling+Freight+PreviousBalance  .
This is My query:
SELECT
jklnzhang.id,
jklnzhang.Customer,

jklnzhang.SaleAmount,
jklnzhang.Handling,
jklnzhang.Freight,



jklnzhang.SaleAmount + jklnzhang.Handling+jklnzhang.Freight+ifnull(totaldepnsebycalno.Depense,0) AS Balance,
jklnzhang.Editor,
CustomerBalance.Balance AS Reall,
jklnzhang.dasuanzhanghao AS CBM,
TransfertTotalByCalNo.IcomeAmount,
jklnzhang.SaleAmount + jklnzhang.Handling+jklnzhang.Freight+ifnull(totaldepnsebycalno.Depense,0)  -IFNULL(TransfertTotalByCalNo.IcomeAmount,0) AS OtherThing
FROM jklnzhang
LEFT OUTER JOIN CustomerBalance ON jklnzhang.Customer = CustomerBalance.CustId
LEFT OUTER JOIN TransfertTotalByCalNo ON jklnzhang.CalNo = TransfertTotalByCalNo.CalNo
LEFT OUTER JOIN totaldepnsebycalno ON jklnzhang.CalNo = totaldepnsebycalno.CalNo
ORDER BY jklnzhang.Customer
0
I heard that replication (master slave) can help minimize outages due to heavy schema changes, yet I'm not sure I fully understand that!
1-Do we run changes on the slave then promote that slave to master? If so how is it possible to write to master?
2-what are the cases where replication can help with avoiding or minimizing outage?
0
Greetings,

I am trying to produce some reports that involve me running cron jobs from Linux server but when I attempt it I get mysql error stating 'user'@'%' access denied. I am running this from a linux server that is connecting to AWS MySQL instance. Please advise.
0
1.How to do questions based on mysql transactions for exam?
(important points)

2.Diffrence between jRadioButton & jCheckBox
0

MySQL Server

47K

Solutions

23K

Contributors

MySQL is an open source, relational database management system that runs as a server providing multi-user access to a number of databases. Acquired by Oracle in 2009, it is frequently used in combination with PHP installations, powering most of the WordPress installations.