Here is a basic question, what is the fastest way to transfer a MySQL database? Here are the variables at play: 1) Database is just shy of 3GB 2) Transfer is between two servers running different versions of MySQL 3) There will not be usage of the database during transfer, I can even shut down MySQL if needs be. 4) The database is mostly MYISAM but with a few InnoDBs and a couple Memory (VBulletin) 5) Both servers are Linux based and I have root access on both. I've done the transfer using a mysql dump, but the import took …

Member Avatar
Member Avatar
+0 forum 13

I'm currently working on my project. I use Vertrigo as my virtual server. However recently i always see this message when i use it.... MySQL database server does not work correctly. Check whether other applications use the important port (3306)... i'd no clue at all but then i reconfigure my MySQL..problem still persist. Any solution here? How do i check whether any application using that port as well? Thanks

Member Avatar
Member Avatar
-1 forum 17

Hi group, I've just installed Visual Studio 2019 and have started my first app using this. Within the program I created a database using the tools provided in Visual Studio. I now want to begin writing to the tables I've created. But I'm stumped on how to do this. Hopefully you can help. This database is installed on my laptop and is called DATAWHOUSE. Will I need some kind of connection string to write to the data table (and to read from it and/or make changes to it in the future)?

Member Avatar
Member Avatar
+0 forum 2

plz... some give me the answer for this . this was asked in an interview.

Member Avatar
Member Avatar
+0 forum 26

If a bulk MySQL insert takes 5 minutes to complete, and one of the columns in the table is a TIMESTAMP column with a default value of CURRENT TIMESTAMP, will the timestamps of the rows that were inserted be reflective of the entire 5 minutes, or will they all default to the same timestamp from beginning or the end of the query? The bulk insert exists within a transaction.

Member Avatar
Member Avatar
+0 forum 3

Hi to all! I'm fairly new to using High availability group and i've been having issues with storage space from my Logs drive from my primary server.. I just want to know why is my Log file not shrinking after I do backups(Full) on the primary server.. also, another question.. can I do the backup on my secondary server before shrinking my Logs on the primary? the reason I want to do this because my primary server has a database primarily used for Production(MES) and I don't want any downtime on their part.. Thanks in Advance.

Member Avatar
Member Avatar
+0 forum 4

Hello i have a project that uses firebase but i want to make connect to my MySql database on xampp. Any idea what to do?

Member Avatar
Member Avatar
+0 forum 1

I have been cracking my head on this mater in the past couple of days. I am faced with a situaton where i need to write a MySQL equivalent of PHP code to loop through sql select results. The Php code looks like this $query = "SELECT pubid, author FROM refs"; $sql=$con->prepare($query); $sql->execute(); $sql->setFetchMode(PDO::FETCH_ASSOC); while ($row=$sql->fetch()){ $id= $row['pubid']; $author = $row['author']; $name = explode('., ', $author); } How can one write sql/mysql query that does the same?

Member Avatar
Member Avatar
+0 forum 6

Hi Please why I got this error(SQL Error: ORA-00907: missing right parenthesis) whats wrong in my code? CREATE TABLE artphoto( photonr NUMBER(10), artnr NUMBER(10) NOT NULL, filtyp VARCHAR2(5) NOT NULL, path VARCHAR2(100) NOT NULL, CONSTRAINT artphoto_photonr_pk PRIMARY KEY(photonr), CONSTRAINT artphoto_artnr_fk FOREIGEN KEY(artnr), REFERENCES art(artnr), CONSTRAINT artphoto_filtyp_ck CHECK(filtyp in ('gif','jpg')) ); Error starting at line 1 in command: CREATE TABLE artphoto( photonr NUMBER(10), artnr NUMBER(10) NOT NULL, filtyp VARCHAR2(3) NOT NULL, path VARCHAR2(200) NOT NULL, CONSTRAINT artphoto_photonr_pk PRIMARY KEY(photonr), CONSTRAINT artphoto_artnr_fk FOREIGEN KEY(artnr), REFERENCES art(artnr), CONSTRAINT artphoto_filtyp_ck CHECK(filtyp in ('gif','jpg')) ) Error at Command Line:8 Column:44 Error report: SQL Error: ORA-00907: …

Member Avatar
Member Avatar
+0 forum 9

I was attempting to store chat logs in a MySQL database where the message field is utf8_general_ci However, when it came across an emoji, it would choke, and the message field would only include text up to the emoji character. I changed the message field to be utf8mb4_general_ci, which seemed to be suggested upon googling, and now emoji characters are replaced in the database with four question mark characters, instead of choking. What is the best way to encode/decode emoji characters so that they can be accurately represented? (Ideally with PHP)

Member Avatar
Member Avatar
+0 forum 6

Hi everyone, I have database which has data of past 2 years. I want to get that data for current financial year. [COLOR="Green"](Here financial year is 1st april to 31st of March)[/COLOR] This query returns data for current calender year i.e. [Jan-to-Dec] [COde=sql] SELECT DATENAME(MONTH, DATE) AS MonthName, SUM(NetAMOUNT) AS dsfd from SALESMASTER GROUP BY DATEPART(MONTH, DATE), DATENAME(MONTH, DATE) ORDER BY DATEPART(MONTH, DATE)[/COde] I want to see the same data in the form of financial year i.e. [April-to-March] just take care financial year involves 9 months of previous year and 3 months of current year. please reply..

Member Avatar
Member Avatar
+0 forum 4

I got a syntax error flag in my "users" database table, but can't figure the issue out. Please, I need your help. The following is the error message: Error SQL query: --------------------------------------------------------- -- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `user_id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , `username` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , `firstname` VARCHAR( 32 ) COLLATE utf8_unicode_ci NOT NULL , `lastname` VARCHAR( 32 ) COLLATE utf8_unicode_ci NOT NULL , `email` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , `phone` VARCHAR( 30 ) COLLATE utf8_unicode_ci NOT …

Member Avatar
Member Avatar
+0 forum 2

Is the method in MySQL to set in SQL script dynamic log file name? e.g in Oracle PL/SQL set define on column sdate new_value sdate select to_char(sysdate,'YYYY.MM.DD_HH.MI') sdate from dual; spool 'logs/install_&sdate..log'; e.g. in PG/SQL \o ./logs/install_`date +"%Y-%m-%d_%H%M"`.log but I cant find similar in MySQL \T ??????

Member Avatar
Member Avatar
+0 forum 6

How do i format my Query result so it has thousand seperator and only to 2 decimal places <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Daily Sales</title> <link rel="stylesheet" href="../styles/login.css" media="all" /> </head> <body class="normal"> <?php include("../includes/x3connect.php"); ?> <?php $sql="SELECT SUM (CASE WHEN FFP.BPARTNER.CUR_0='GBP' THEN (FFP.SORDERQ.YORIQTY_0 * FFP.SORDERP.GROPRI_0) ELSE ((FFP.SORDERQ.YORIQTY_0 * FFP.SORDERP.GROPRI_0) * FFP.SORDER.CHGRAT_0) AS MONEY END) FROM FFP.SORDER INNER JOIN FFP.BPARTNER ON FFP.SORDER.BPCORD_0 = FFP.BPARTNER.BPRNUM_0 INNER JOIN FFP.SORDERP ON FFP.SORDER.SOHNUM_0 = FFP.SORDERP.SOHNUM_0 INNER JOIN FFP.SORDERQ ON FFP.SORDER.SOHNUM_0 = FFP.SORDERQ.SOHNUM_0 WHERE FFP.SORDER.YFPSODAT_0=DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0) and FFP.SORDER.SOHTYP_0!='SO6' and FFP.SORDER.YFPSOSO_0=2 and …

Member Avatar
Member Avatar
+0 forum 1

Hi I have the following code that i can run in MSSQL Query and the result are returned correctly but when i try to run it in PHP it errors what do I need to change to get it to work please. SELECT SUM (CASE WHEN FFP.BPARTNER.CUR_0='GBP' THEN (FFP.SORDERQ.YORIQTY_0 * FFP.SORDERP.GROPRI_0) ELSE ((FFP.SORDERQ.YORIQTY_0 * FFP.SORDERP.GROPRI_0) * FFP.SORDER.CHGRAT_0) END) FROM FFP.SORDER INNER JOIN FFP.BPARTNER ON FFP.SORDER.BPCORD_0 = FFP.BPARTNER.BPRNUM_0 INNER JOIN FFP.SORDERP ON FFP.SORDER.SOHNUM_0 = FFP.SORDERP.SOHNUM_0 INNER JOIN FFP.SORDERQ ON FFP.SORDER.SOHNUM_0 = FFP.SORDERQ.SOHNUM_0 WHERE FFP.SORDER.YFPSODAT_0=DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0) and FFP.SORDER.SOHTYP_0!='SO6' and FFP.SORDER.YFPSOSO_0=2 and FFP.BPARTNER.CUR_0='GBP'

Member Avatar
Member Avatar
+0 forum 2

Dear all, I have a scenario, where I have a single table with all my users listed in them. Each user also has a field indicating the user they report to. UserID UserDisplayName UserReportsTo ----------- ------------------------------------------------------------ ------------- 8 Anthony Karimi 3 9 naheed kassam 8 1 Administrator 1 3 Ramakrishna 2 2 SB 2 (5 row(s) affected) In my scenario, i need when the user selected is say userid = 3, then the table displays userid = 3; userid = 8 who reports to userid = 3; and userid = 9 who reports to userid = 8 as shown below …

Member Avatar
Member Avatar
+0 forum 4

Hello all members, I am new to this this website. I am working on an assignment and I have a scenario where I have to find the key attributes, entities and keys. Below is the scenario, An international courier, express and parcel Services Company is setting up a package shipping system for customers to ship packages. Whenever a customer wishes to ship a package, they can call the company‚Äôs customer service personnel to place a shipment request. A computer system is needed to track the shipment details of the package. This will enable the company to keep track of their …

Member Avatar
Member Avatar
+0 forum 3

We have a MS Access database located on a shared drive. Is there a way I can allow multiple users to access and update the database at the same time?

Member Avatar
Member Avatar
+0 forum 6

Hi, i have installed prestashop 1.4.8.2 & i need a report of first order date for each customers, please help me to create mysql query. i need below columns information from database. id_customer, firstname, lastname, first order date thanks, Ritesh

Member Avatar
Member Avatar
+0 forum 12

I currently have some code that gets the overall top 25 frame sales, which is as follows: `Dim FrameCountSelectStr As String = "SELECT TOP 25 Count(Glasses.OrderID) AS GlassesCount, Glasses.Manufacturer, Glasses.FrameName FROM(Glasses) WHERE FrameName <> '' AND OrderDate >= #" & SearchDateStart & "# AND OrderDate < #" & SearchDateEnd & "# GROUP BY Glasses.Manufacturer, Glasses.FrameName ORDER BY Count(Glasses.OrderID) DESC"` What I would also like to do is get the top 25 frame sales for each DISTINCT company and group the results by company (and order by count). I tried the following but I am not having any luck: `Dim FrameCountSelectStr …

Member Avatar
Member Avatar
+0 forum 6

I have been butting my head against this problem for the past 4 hours, and I have to tap out. I know I can't be too far from correct I am just not sure what the missing ingredients are. Here is the problem question: Student status: List of all students and their enrollment status Fields: student last name and first name (comma separated), years enrolled, academic advisor last name and first name (comma separated) Sort: years enrolled Input: none Filter: only include currently active students and My code: SELECT student_id,std_l_name, std_f_name, faculty_l_name, faculty_f_name,student_id_fk,enroll_date,MONTHS_BETWEEN(CURRENT_DATE ,enroll_date) V1: FROM STUDENT, FACULTY,ENROLLMENT WHERE FACULTY.faculty_id=STUDENT.faculty_id_fk3 …

Member Avatar
Member Avatar
+0 forum 2

I have the following script which successfully finds the values for $payer_email, reminder_date and sub_expire_date, however where I am having trouble is when I apply a WHERE condition to the SELECT. The condition I am trying to apply is the commented out line at the end of the SELECT. The intention of the WHERE is to filter the values from the SELECT to only provide those values which point to the subscription expiry (sub_expire_date) thirty days ahead of time, but no values are found when they really should be. Can anyone tell me what is wrong? <?php error_reporting(E_ALL ^ E_NOTICE); …

Member Avatar
Member Avatar
+0 forum 1

Am trying to create edit-form but there are some problem which I cant determine by my self. I cant echo inserted record and updating. <?php include("db_con.php"); $edit_reg_no = filter_input(INPUT_GET, 'edit_customer_detail', FILTER_VALIDATE_INT, ['options' => ['default' => NULL]]); if(isset($_POST['update'])){ $update_reg_no = $edit_reg_no; //getting the text data from the fields $d_fname = $_POST["d_fname"]; $d_lname = $_POST["d_lname"]; $customer_name = $_POST["customer_name"]; $mobile = $_POST["mobile"]; $office_tel = $_POST["office_tel"]; $email_fax = $_POST["email_fax"]; $model = $_POST["model"]; $engine = $_POST["engine"]; $vin = $_POST["vin"]; $work_carry = $_POST["work_carry"]; $demage_found = $_POST["demage_found"]; $accessories = $_POST["accessories"]; $car_received = $_POST["car_received"]; $mileage_covered = $_POST["mileage_covered"]; $update = "update customer_details set d_fname='$d_fname', d_lname='$d_lname', customer_name='$customer_name', mobile='$mobile', office_tel='$office_tel', email_fax='$email_fax', …

Member Avatar
Member Avatar
+0 forum 3

I am using MS SQL and have logs that are in .mdf and .ldf format. It took us a while but we figured out how to get our new settings correct and coming in w3c format. The olf files are still .mdf and I need to know what I can do to open them and view them. I have no database experience and want to know if there is a program I can use to do so. I have tried MSDEtoText.vbs and were unsuccessful running the script. Any suggestions will be greatly appreciated.

Member Avatar
Member Avatar
+0 forum 3

Hi guys, i have a login page where i created a session trainer after login. the session is the mail address of the trainer. now from another apsx page, i would like to retrieve the staffid of the user logged in using the session as criteria. I tried to write the below code but its not working. Any ideas please? Dim cmd As New SqlCommand Dim query1 As String query1 = "SELECT staffid FROM tblstaff WHERE email='" & Session("trainer") & "'" connect.ConnectionString = Constr connect.Open() cmd = New SqlCommand(query1, connect) Dim rdr As SqlDataReader = cmd.ExecuteReader Dim bFound As Boolean …

Member Avatar
Member Avatar
+0 forum 1

Hi not sure if this is possible so wanted some guidance.. I have a database with 3 columns.. id, data,timestamp id is auto increment and data is json array and timestamp is unix timestamp.. the field I wanted to update was data but I wanted to replace just a part of it.. see sample data below (id, data, timestamp) (1, '{"Employee_Number":"235","First_Name":"Test","Middle_Name":"TEST2"}',1495120538) I wanted to replace the 235 with 544 but I will not know what data there is in the data field .. I will only know the id I tried UPDATE `table` SET `data`= replace(data, '{"Employee_Number":"%","First_Name"', '{"Employee_Number":"544","First_Name"') WHERE `id` …

Member Avatar
Member Avatar
+0 forum 3

**I can't update inserted data via GUI, Its working well on inserting records before I modify it, and when am trying to modify in order to update inserted data its not update as I expect to happen. I can display inserted data well by echo them to GUI Below is the update form that Am trying to create Please help me. Am just a beginner, thanks** <?php include ("db_con.php"); if(isset($_POST['update'])){ $update_id = $post_id; //getting the text data from the fields $post_title = $_POST["post_title"]; $category_id = $_POST["category_id"]; $post_author = $_POST["post_author"]; $post_keywords = $_POST["post_keywords"]; $post_content = $_POST["post_content"]; //getting the image form the …

Member Avatar
Member Avatar
+0 forum 2

Good day, I having a problem where creating my setting table as condition below column User_id setting effective_date effective_end_date Row 1: 1 ABC 2017-03-01 2018-02-28 Row 2: 1 DEF 2018-03-01 2019-03-01 I wish to add a constraint to block if same user add in a setting with the effective_date or effective_end_date between existing setting. Is that posible? I had searching and trying for a few days now without succeed to archive what I trying to do. Please kindly guide me through this. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

Hello, so, I'm playing a bit with **MariaDB 10.0.29** and I cannot understand why `FOUND_ROWS()` keeps returning the `1` whatever happens to the latest select query. Here's my test: > CREATE TABLE `test` (`id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, `msg` VARCHAR(100) NULL) ENGINE = InnoDB; Query OK, 0 rows affected Time: 0.782s > INSERT INTO `test` (`msg`) VALUES('apples'), ('oranges'), ('strawberries'), ('cherries'), ('random'); Query OK, 5 rows affected Time: 0.180s > SELECT SQL_CALC_FOUND_ROWS * FROM `test`; +------+--------------+ | id | msg | |------+--------------| | 1 | apples | | 2 | oranges | | 3 | strawberries | | 4 | …

Member Avatar
Member Avatar
+0 forum 6

SAMPLE TABLE 1 =================================== product Division sales % =================================== product1 divsion1 99 product2 divsion1 51 product3 divsion1 50 product4 divsion2 98 product5 divsion2 41 product6 divsion2 40 product7 divsion3 97 product8 divsion3 31 product9 divsion3 30 =================================== Expected output 1 =================================== product2 divsion1 51 product3 divsion1 50 product5 divsion2 41 product6 divsion2 40 product8 divsion3 31 product9 divsion3 30 Hi All, I am having a single table. In this table I need to get product name which is not having maximum sale % for each division. Please help me to get this results. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 6

The End.