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,

We are doing impact analysis on the new type AFTER convert from Oracle 10g/12c to to MariaDB, any information on

1) Is there any impact on the change of type ( in terms of RAM, disk space and CPU) ?
2) What to do to get ride of the impact?
3) URL for the proof?

For the following type conversion:

NUMBER(10,0)  and NUMBER (9,0) convert to BIGINT
NUMBER(3,0) convert to SMALLINT
NUMBER(1,0) convert to TINYINT.
NUMBER without () (e.g. NUMBER) to DOUBLEe
      DATE  to DATETIME
      VARCHAR2() to VARCHAR()  (e.g. VARCHAR2(1 CHAR) will become VARCHAR(1). VARCHAR2(100 CHAR) will become VARCHAR(100)
0
hi,

right now planning the last stage of oracle to mariaDB migration and here are some BI related question, hope you all can give a hand.

On the change on the DB and data column type. (e.g. Oracle varchar2() to MariadB varchar()),  usually any impact on GUI and report design?
0
I am using WAMP on my Windows 10 machine.

I am having the same issue on my Ubuntu machine.

When I add to many columns to my database I get an error:

Rebuild database fault: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.

Open in new window


I have gone to the my.ini file and added:
innodb_strict_mode=0

I have also tried increasing my log file size to 512 and the buffer size to 2048 just to see. Still no change.

Any time I try and add another column in mysql I get the error.
0
Can you look up a subsequent record like the below using a MySQL trigger and omitting the ID lookup SELECT statement in the original query?


INSERT INTO _skills_emp_link (skill_id, emp_id, region_id)
                         VALUES (‘2.’, ‘4’, (SELECT region_id FROM employees WHERE employee_id = ‘4’));

Open in new window


Basically I would like to issue a Query like:
 INSERT INTO _skills_emp_link (skill_id, emp_id) VALUES ('2', '4') 

Open in new window


and a BEFORE or AFTER INSERT trigger to take the emp_id 4 (entered in the initial query) and look up the attributed region_id and append the SQL query so that the FK constraints work properly.
0
This is related to MySQL.
I ran a command --> mysqldump -u -p DBNAME > [Path of .sql file],
After running this command , I ran --> mysql -u -p DBNAME > [Path of .sql file].
After this, my Table data got overwritten and my Table is blank. Only the table structure remains. Please suggest how to bring back the Table original Data.
0
MySQL form POST to database.  When INSERT INTO query is performed on what seems are random basis (or perhaps it is based on content of the data POSTed from the text area on the from, the data saved to the field in the database sometimes has duplicate information.  For example, if there are multiple sentences, a portion of one of the sentences will be duplicated in the paragraph of text.  Not sure what would cause something like this.  When using the form we can edit and try to save the same text several times, usually it will eventually save correctly.  I have several other application/database pairs on the same web/mysql server and don't seem to experience this issue.  So I am assuming the problem is coming from this specific website.

Here are some code snippets:

from the PHP form:

<div id="workOrderForm">
                  
                                                   
                              <form name="workOrderForm" method="post"  action="formdata.php">
               
                                       <div class="formLable">Client Code:</div>
                                       <input name="clientCode" type="text" class="formFiller" onkeypress="return disableEnterKey(event)" option value="<?php echo $result['clientCode'];?> "  />
                                    
                                    <div id="emailLable">Email:</div>
                                       <input name="email" type="text" id="emailFiller" onkeypress="return disableEnterKey(event)" option value="<?php echo $result['email'];?>" />
                                                                        
                                    <div class="formLable">Company Name:</div>
                                       <input name="companyName" type="text" class="formFiller" onkeypress="return …
0
Hi,  I'm creating a PHP and MySQL web application for a client. I'm a fairly new web developer.
Is there a way to add page titles and meta tags dynamically? It's a small application. I'm not using a Framework.
I saw a couple of possible solutions on google, but am not sure what the easiest and most efficient way of doing it would be.

Possible Solution #1, add variables in my header.php page and then on each respective page for example about, contact etc... add those variables above the include statement.
Here is my header.php code:

?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="utf-8">
	
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="<?php echo $meta_description; ?>">
	<meta name="author" content="Ryan Sacks">
	<link rel="icon" href="img/favicon.ico">
	
	<title><?php echo $page_title; ?></title>
	
	<!-- Bootstrap core CSS -->
	<link href="css/bootstrap.min.css" rel="stylesheet">
	
	<!-- Font Awesome Icons -->
	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
	
	<!-- Custom CSS -->
	<link href="css/style.css?v=<?php echo time(); ?>" rel="stylesheet">
	
	<!-- Google Fonts -->
	<link href="https://fonts.googleapis.com/css?family=Oswald:300,400,500" rel="stylesheet">
	<link 

Open in new window

0
I have a problem updating a mysql table entry.  I copied and pasted the format I've used for years to update tables, but for some reason it is not working here.

My query reads, $queryUpdate1=mysql_query("UPDATE material SET _3Quan = '$_3Quan' WHERE file='$file'") or die('Query failed1: '.mysql_error());

The variable $_3Quan has a value of 100, but when the material table is updated, it returns a value of 0 to the _3Quan field.  Prior to update the value was 95.

Can you help me figure out what I'm doing wrong here?
1
I would like to update fields in an existing group the custom fields in WordPress more quickly  in a "BATCH form" did anyone here mange to do it without messing up.
for example I want to start with adding extra text fields to an existing group,
Maybe MYSQL request ?
Maybe JSON request.
has anyone done this ?
0
Hi,
I’m creating a web application using PHP and MySQL. I’m looking for a simple solution to be able to accept online payments. If I was using a CMS like WordPress or Joomla I know for WordPress there’s WooCommerce, I could just use a Plugin, But I’m not. Again, if I were using Magento or Presta Shop or something but again I’m not, I’ve coded everything from scratch. What’s unique about my clients situation is that he will only be selling one product, so it’s not like a big E-commerce store with thousands or tens of thousands of products.
From what I’m learning I believe I’m going to need to use either PayPal or Stripe and I might have to create my own checkout and cart pages but I’m not really sure. Anyone know of a simple solution?
0
I want make a display Candy name only display icon tick in the column Candy without duplicate in column melvin and angel . But right now my data is duplicate over in every name column .
 
question1.JPGThis is my table display right now

      <div class="card mb-3">
        <div class="card-header">
          <i class="fa fa-table"></i> Calendar</div>
        <div class="card-body">
          <div class="table-responsive">
            <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
              <thead>
			  <tr>
			  <th>Time</th>
			  <?php 
			  $namearr = array(); 
			  $sql="select * from admin_staff";
			  $result3= mysqli_query($DBcon,$sql);
			  while ($row3= $result3->fetch_array()){ 
			  ?>
			  <th><?php echo $row3['name']; }?></th>
			  </tr>
			  </thead>
			  <tbody>
			  <?php 
				
				$open_time = strtotime("9:00");
				$close_time = strtotime("21:00");
				
			  for($i=$open_time; $i<$close_time; $i+=3600){
			  ?>
			  <tr>
			  <td><?php echo date("l - H:i",$i); ?></td>

			  <?php 
			  $sql_count="select count(*) as counter from admin_staff";
			  $result_count= mysqli_query($DBcon,$sql_count);
			  $rowcount= mysqli_fetch_assoc($result_count);
			  for($count=1;$count<=$rowcount['counter'];$count++)
			  {
			  ?>
			  <td>
			  <?php 
				$new_time= date("H:i:s",$i);
				
			  	$sql= "select * from admin_calendar where time='$new_time'";
				$result4= mysqli_query($DBcon,$sql);
				$row4= 

Open in new window

0
Hi,
I'm fairly new to php and mysql but I'm creating a PHP and MySQL web application for a client. I have a register.php page with the following form fields:
Contact Name, Phone, Email, Password, Confirm Password, Ticket Holder Password and Ticket Holder Confirm Password, where Users can register/sign up to use the app. Once they do register, they get redirected to admin_login.php page where they can login and get full access to the app and various other pages I've created.

My Problem:
My Password validation functions aren't working and I'm not sure why. I want the passwords to be a minimum of 8 characters, contain one upper and lowercase letter, a number and a special character. I'm using a regular expressions code that I found online. What I want is to validate the Password fields, so if the User enters a password that meets the criteria mentioned above than it should INSERT the data INTO the database, if it doesn't meet the Password criteria mentioned above I want to display an error message saying: "Password must be minimum of 8 characters, contain one upper and lowercase letter, a  number and a special character". I'm new to using php functions and how to call them properly.

This is the code in my functions.php page:

<?php

// FUNCTIONS.php

// clean the form data to prevent injections

/* Built in functions used:
   trim()
   stripcslashes()
   htmlspecialchars()
   strip_tags()
   str_replace()
*/

function validateFormData($formData) {

Open in new window

0
In below scenerio, how mysql master- master replication can be used?

3 local xampp servers in different location
1 live server
0
OK so we have an in house marketing database that used to connect to a remote MySQL database on a Linux server. I decided to migrate to a MySQL server on our in house computer that also serves as the domain controller. everything is working fine except when I try to export a CVS. This was all operational when it was connecting to the Linux server prior. Please give me a hand guys!

The error that I am getting is below:
MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered attempting to read the resultset. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Reading from the stream has failed. ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at …
0
Hello,

this morning I got below MySQL DB error. It seems as a temporary error, but in order to avoid any possible future problems, I need your suggestions on below error.

I am herewith attaching error log for more details.

Workflow Manager Exception : PersistenceException - org.hibernate.exception.GenericJDBCException: Could not open connection
mysqld.log
0
All,
I need to create a MySQL query that will be run through pHp.
I have 2 tables Record & Donations. The only field they have in common is the "email" field.
The Donations table has fullname, email, donation amount, donation date and year (yyyy).
The Record table has fname, lname, add1, add2, city, state, zip and email.

I would like results:
Want a listing of all the emails from everyone who has ever given, but NOT to include current donations for next year.
The search should examine both tables and remove any duplicate emails.

The 1st part is easy -
SELECT email FROM Donations WHERE  year <> '2019'  ORDER BY `email` asc;

I can get a listing of all the emails in Record that don't have a match anywhere in Donations by using

Select email FROM Record WHERE NOT EXISTS (SELECT email FROM donations WHERE Donations.email =  Records.email)  ORDER BY `email` asc;

But I'm not sure that is exactly the right statement and I don't know how to combine the 2 parts.

Any assistance would be appreciated.

Thanks,
Russ
0
Dear Experts

I have a question about python and mysql interaction. I have big table which contains column named DATETEXT, which simply contains full datetime in text format, like "Fri, 09 Aug 2013 18:46:10 +0200", I need to convert it to datetime value which is not a problem, but I need to update another column in the same table with this value.

So my question is how to update one columns in table X based on value of another column in table X.

Many thanks

Vladimir
0
Description of issue:
  • We are attempting to migrate data and continue to replicate from our local MYSQL database to Aurora MySQL. Aurora is reporting that we have successfully completed a migration however when we check the data not all the records have migrated after a certain point. After this point no more of the original records are copied however the database continues to replicate changes after the initial full load. Leaving a gap of missing records.
  • This problem only occurs with tables with BLOB fields. Even though tables with BLOB fields do not full load all records the task reports 100% completion and no tables errored.
  • As stated replication continues as normal afterwards and new rows are inserted.
  • Approx 350,000 records are missing
  • Full LOB mode is enabled with default chunk size of 64.
  • We have set max_allowed_packet and wait_timeout on the target to their maximum values 1073741824 and 31536000 respectively.
  • We also reduced the commit rate during full load to 1000. We found that the default values for these would cause the full load to fail and continually restart.

Source: On site MySQL 5.7.20 Community over VPN
Target: Aurora MySQL 5.7.12 db.r4.large
Replication instance: dms.r4.large, version 3.1.2, 80GB storage
Migration type: Full Load, Ongoing Replication
Network transfer: Over VPN to the VPC
Size of transfer: ~700 tables totalling nearly 50GB
 
Example:
0
hi,

I am considering how to HA to maxscale for MariaDB as maxscale is the SPOF, and I am suggested to use Pacemaker, Keepalived and/OR Heartbeat, how can those component fit into the maxscale and MariaDB cluster DB environment ?

any topology diagram for it?

which one is better in terms of stability ?
0
Hi,I'm having trouble trying to change the bootstrap .active class state via jquery.I've googled and found several solutions but none of them are working for me.Here is my html code:

[code]<section id="hero">
   			<div class="container-fluid">
               <div class="container">
				   <div class="row">
						<div class="col-md-12">
							<nav class="navbar navbar-toggleable-md navbar-light">
							  <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNavDropdown2" aria-controls="navbarNavDropdown2" aria-expanded="false" aria-label="Toggle navigation">
								  <span class="navbar-toggler-icon"></span>
								  <span class="fas fa-times hide" data-wow-delay="2s"></span>
							  </button>
							  <a class="navbar-brand logo" href="index.php"></a>
							  <div class="collapse navbar-collapse" id="navbarNavDropdown2">
								<ul class="navbar-nav ml-auto">
								  <li class="nav-item active">
									<a class="nav-link" href="index.php">Home <span class="sr-only">(current)</span></a>
								  </li>
								  <li class="nav-item">
									<a class="nav-link" href="about.php">About Us</a>
								  </li>
								  <li class="nav-item">
									<a class="nav-link" href="howitworks.php">How it Works</a>
								  </li>
								  <?php
								  if( $_SESSION['loggedInUser'] ) { // if user is logged in
								  ?>
							      <li class="nav-item dropdown">
									<a class="nav-link" 

Open in new window

1
Hi,
I'd like to print each one of these tickets on a envelope (#10), so I would like to output a single pdf document with 4 pages, one ticket per page. I don't know if it's possible to print my HTML content on an envelope sized 9.5" x 4.125". If you look at the screenshot attached, you'll see I have all 4 tickets on a single page. I want to create a single PDF document with multiple pages, again one ticket per page.
Here is my code I have so far:
// winning tickets pdf
function fetch_data() {  
      $output = '';
      $userID = ($_SESSION["loggedInUserID"]);
      //$conn = mysqli_connect("localhost", "lormar5_wo693", "sDieYQb752KZc!;", "lormar5_wo693");  connection to theme
      $conn = mysqli_connect("localhost", "root", "root", "db_hockeypoolfundraiser");
	  $sql = "SELECT * FROM participants LIMIT 1";  
      $result = mysqli_query($conn, $sql);  
      while($row = mysqli_fetch_array($result))  
      {       
      $output .= '<tr>
	  			<td style="border-bottom: 1px solid #dfdfe0;">
				<br><br><strong>Winners Name:</strong> '.$_SESSION["participantName"].'
				<br><br><strong>First Goal Time:</strong> '.$_SESSION["firstGoalTime"].'
				<br><br><strong>Game Date:</strong> '.$_SESSION["gameDate"].' <br><br>
				</td>
				
				<td style="border-bottom: 1px solid #dfdfe0;">
				<br><br><strong>Phone:</strong> '.$_SESSION["participantPhone"].'
				<br><br><strong>Amount:</strong> $'.$_SESSION["priceFirstGoal"].'
				<br><br><strong>Player:</strong> 

Open in new window

0
I have a form/page that I'm using to book in stock based on a poNumber that generates the stock items linked to that poNumber/supplier. Currently for each line (there may be 10 items for example on order) the user needs to add qty rec'd, qty outstanding, receipted by and delivery note number in the form for each line.

I want to short cut some of the data entry by having a single entry for receipted by and delivery note number but for this to populate the rows for each entry once submitted.

The code I have at the moment is as follows: -

<div class="container">	
	<form class="form" method="post" action="transit_temp.php">	
	
	<?php
	
	$poNumber = isset($_POST['poNumber']) ? $_POST['poNumber'] : false;
	
	$poNumber = $mysqli->real_escape_string($poNumber);
	
	$index=0;

	$query = 'SELECT * FROM goodsInTrans WHERE poNumber = "'.$poNumber.'"';
			
				if (!$result = $mysqli->query($query)) {
				$err
				= "QUERY FAIL: "
				. $query
				. ' ERRNO: '
				. $mysqli->errno
				. ' ERROR: '
				. $mysqli->error
				;
				trigger_error($err, E_USER_ERROR);
				}		
	
				while ($row = $result->fetch_object())
				
				{ 

				?>
					<div class="form-group row">
						<div class=""><input type="hidden" 				class="form-control" 	name="data[<?php echo $index; ?>][supplier]" 			value="<?php echo $row->supplier ?>"/></div>
						<div class="col-xs-3"><input type="text" 		class="form-control" 	name="data[<?php echo $index; ?>][sku]"	 				value="<?php echo $row->sku 

Open in new window

0
Hello Experts


Need help with code 1064.

mysql> CREATE TABLE BankOfItaly(name char(20) NOT NULL, email varchar(20) NOT NULL, MonetaryValue float(7,2) NOT NULL, Phone int(10) NOT NULL PRIMARY KEY(name));

Open in new window


I have checked over the syntax yet, when creating a new database with an associated table this error occurs. How do I create tables successfully so this error does not occur anymore? The error is issue with assigning the Primary Key to (name))
0
I need to search for an order in my WooCommerce back office by email address.  I can see the email address in wp_users but don't know how to put a name to the email address.  Is there a plugin or mysql code that will accomplish that?

Thanks,
0
Hello,
I'm working on a code that can record vocal messages and store them into a database to retrieve them later on, but my PHP script isnt working and I don't have enough expertise in web dev to correct it, can someone help me please ?
index.html
upload.php
app.js
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.