What I can't understand  The process of how I got to the problem and the detaile are explained below, but I genuinely don't understand the part where it says I just moved from ubuntu 18.04 to Ubunu 20.04.   php7.4-mysql : Depends: php7.4-common (= 7.4.3-4ubuntu2.2) but 7.4.9-1+ubuntu18.04.1+deb.sury.org+1 is to be installed E: Unable to correct problems, you have held broken packages.    I can understand that the package php7.4-mysql dependes on php7.4-common (which is installed, so I don't see the problem there), but it also says (= 7.4.3-4ubuntu2.2) and then I'm lost... 7.4.3-4ubuntu2.2? WHAT IS THAT? and if that is not complicated enough it adds... but 7.4.9-1+ubuntu18.04.1+deb.sury.org+1 and then I just can't figure out how to move past this.   More insight  I know a similar questions has been asked, I've read them and the solutions posted don't seem to fix my problem. I'm trying to use the $ php artisan migrate command in a production environment of my own (I hired a hosting and I'm just messing around with it), and I get the output...    Illuminate\Database\QueryException     could not find driver (SQL: select * from information_schema.tables where table_schema = gastigram and table_name = migrations and table_type = 'BASE TABLE')    at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671     667|         // If an exception occurs when attempting to run a query, we'll format the error     668|         // message to include the bindings with SQL, which will make this exception a     669|         // lot more helpful to the developer instead of just the database's errors.     670|         catch (Exception $e) {   &gt; 671|             throw new QueryException(     672|                 $query, $this-&gt;prepareBindings($bindings), $e     673|             );     674|         }     675|         +34 vendor frames    35  artisan:37       Illuminate\Foundation\Console\Kernel::handle()   I googled it and they say is a problem with a missing driver, makes sense... it says right there missing driver, so I tried to install the php7.4-mysql driver but then...   $ sudo apt install php7.4-mysql  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  php7.4-mysql : Depends: php7.4-common (= 7.4.3-4ubuntu2.2) but 7.4.9-1+ubuntu18.04.1+deb.sury.org+1 is to be installed E: Unable to correct problems, you have held broken packages.  How can I solve this problem with the unmet dependency because of a broken package? Getting help  I run $ apt-cache policy php7.4-common as @guiverc suggested   This is the output php7.4-common:   Installed: 7.4.9-1+ubuntu18.04.1+deb.sury.org+1   Candidate: 7.4.9-1+ubuntu18.04.1+deb.sury.org+1   Version table:  *** 7.4.9-1+ubuntu18.04.1+deb.sury.org+1 100         100 /var/lib/dpkg/status      7.4.3-4ubuntu2.2 500         500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages         500 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages      7.4.3-4ubuntu1 500         500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
507
There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.
63568
MySQL newbie here.  I'm using Ubuntu 16.04 (64-bit). I've successfully installed MySQL Community Server 5.7 and MySQL Community Workbench 6.3.  Unable to find these answers in the MySQL forums. I've asked this on Stack Exchange and it was suggested that I ask here instead. I've searched on Ubuntu Forum and here also but did not find an answer. One would think they are common questions but maybe not. Additionally, I cannot find a way to ask a new question on the MySQL Forum. I've spent a ton of time reading/researching/installing/uninstalling and reinstalling MySQL and community workbench on Linux Ubuntu 16.04 (64-bit) and do not want to lose the momentum I've gained. I'm actually making forward progress after a week or so of trial and error working on this up to a few hours per day. It appears that I cannot load MySQL Community Workbench 8.0 without Linux server installed. That seems to be one of the requirements if I understood correctly.  Can anyone tell me if MySQL Community Workbench 6.3 will work with MySQL Community Server 8.0 on Ubuntu 16.04 (64-bit)? I would still like to upgrade and use MySQL community server 8.0 if I can.  Can I use MySQL Community Server 8.0 on Linux Ubuntu 16.04 32-bit?   I've spent many hours googling it and looking on MySQL Forums but couldn't find the answer. Thanks much. ...Rick
90468
I have postgresql 8.4 installed on my desktop. It keeps starting on bootup because I think I used default settings.   so I issue /etc/init.d/postgresql stop everytime and sometimes i keep forgetting  It has folder paths as,  /etc/postgresql/8.4/main /usr/lib/postgresql/8.4   There are a lot of configuration files and if someone can tell me where to look and what to change, that will be great.   Thanks.
22248
I have Drupal running on MariaDB 5.5.33. When I run update.php (after upgrade to Drupal 7.28 from Drupal 6) I get an error:     Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webdb.location_country' doesn't exist: CREATE TABLE {location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter ISO Country Code', name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Full Country Name ', PRIMARY KEY (code) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Country data managed by location.module.'; Array ( ) indb_create_table() (line 2720 of /home/web/public_html/includes/database/database.inc).   When I try to run command     CREATE TABLE {location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter ISO Country Code', name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Full Country Name ', PRIMARY KEY (code) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Country data managed by location.module.';   in phpMyAdmin I get an error     #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '{location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter IS' at line 1   But I wasn't able to find out where is the problem.
46938
I am trying to execute my PHP code, which calls two MySQL queries via mysqli, and get the error "Commands out of sync; you can't run this command now".  Here is the code I am using  &lt;?php $con = mysqli_connect("localhost", "user", "password", "db"); if (!$con) {     echo "Can't connect to MySQL Server. Errorcode: %s\n". Mysqli_connect_error();     exit; } $con-&gt;query("SET NAMES 'utf8'"); $brand ="o"; $countQuery = "SELECT ARTICLE_NO FROM AUCTIONS WHERE upper(ARTICLE_NAME) LIKE % ? %"; if ($numRecords = $con-&gt;prepare($countQuery)) {     $numRecords-&gt;bind_param("s", $brand);     $numRecords-&gt;execute();     $data = $con-&gt;query($countQuery) or die(print_r($con-&gt;error));     $rowcount = $data-&gt;num_rows;     $rows = getRowsByArticleSearch("test", "Auctions", " ");     $last = ceil($rowcount/$page_rows); }  else {  print_r($con-&gt;error); } foreach ($rows as $row) {     $pk = $row['ARTICLE_NO'];     echo '&lt;tr&gt;' . "\n";     echo '&lt;td&gt;&lt;a href="#" onclick="updateByPk(\'Layer2\', \'' . $pk . '\')"&gt;'.$row['USERNAME'].'&lt;/a&gt;&lt;/td&gt;' . "\n";     echo '&lt;td&gt;&lt;a href="#" onclick="updateByPk(\'Layer2\', \'' . $pk . '\')"&gt;'.$row['shortDate'].'&lt;/a&gt;&lt;/td&gt;' . "\n";     echo '&lt;td&gt;&lt;a href="#" onclick="deleterec(\'Layer2\', \'' . $pk . '\')"&gt;DELETE RECORD&lt;/a&gt;&lt;/td&gt;' . "\n";     echo '&lt;/tr&gt;' . "\n"; } function getRowsByArticleSearch($searchString, $table, $max) {     $con = mysqli_connect("localhost", "user", "password", "db");     $recordsQuery = "SELECT ARTICLE_NO, USERNAME, ACCESSSTARTS, ARTICLE_NAME, date_format(str_to_date(ACCESSSTARTS, '%d/%m/%Y %k:%i:%s'), '%d %m %Y' ) AS shortDate FROM AUCTIONS WHERE upper(ARTICLE_NAME) LIKE '%?%' ORDER BY str_to_date(ACCESSSTARTS, '%d/%m/%Y %k:%i:%s')" . $max;     if ($getRecords = $con-&gt;prepare($recordsQuery)) {         $getRecords-&gt;bind_param("s", $searchString);         $getRecords-&gt;execute();         $getRecords-&gt;bind_result($ARTICLE_NO, $USERNAME, $ACCESSSTARTS, $ARTICLE_NAME, $shortDate);         while ($getRecords-&gt;fetch()) {             $result = $con-&gt;query($recordsQuery);             $rows = array();             while($row = $result-&gt;fetch_assoc()) {                 $rows[] = $row;             }             return $rows;         }     } }   I have tried reading up on this, but I am unsure of what to do. I have read about store result and free result, however these have made no difference when using them. I am unsure at exactly which point this error is being caused, and would like to know why it is being caused, and how to fix it.  Going by my debug statements, the first if loop for countQuery is not even being entered, because of an error in my sql syntax near near '% ? %'. However if I just select * instead of trying to limit based on a LIKE clause, I still get the command out of sync error.
90818
I have been searching for a solution but nothing seems to work.  I have a single Drupal 6 website up on this server.    Server:Ubuntu 12.04 Apache/2.2.22 (Ubuntu) 5.3.10-1ubuntu3.8 MySQL 5.5.32 Drupal 6  Here is a link to my Apache2 and MySQL error files and my config file for MySQL.  Please have a look.  Those files are huge, that is why I linked to them instead of pasted them in here.  If I need to I can paste in here.  Just let me know.  Thanks.  I have done a lot of searching.  I mostly try to Google the errors themselves but can't seem to find the right solution.  I think I have narrowed it down to a problem with innodb but that is it.  I check the tables in the error log and phpMyAdmin say they are ok and I repair them anyway and still get the crashing.  When my site crashes, I have to restart Apache and then restart MySQL and then the site comes back up.  It has been crashing 2 - 6 times a day.  Any help would be greatly appreciated.  Thanks.
123782
I tried installing Drush with both methods listed in the drush.org documentation. I think they might be conflicting with each other if that's possible.   When I run composer global require drush/drush all the components appear to install correctly. However when I change to a Drupal site (Using XAMPP, /opt/lampp/htdocs/sitefolder) and run drush status I get the following error:      PHP Fatal error:  Undefined class constant 'MYSQL_ATTR_SSL_CA' in   phar:///usr/local/bin/drush/lib/Drush/Sql/Sqlmysql.php on line 56   Drush command terminated abnormally due to an unrecoverable error.   [error] Error: Undefined class constant 'MYSQL_ATTR_SSL_CA' in   phar:///usr/local/bin/drush/lib/Drush/Sql/Sqlmysql.php, line 56   I do have the following line in my ~/.bashrc:  export PATH="$HOME/.composer/vendor/bin:$PATH"  Unfortunately I don't know how to troubleshoot from here, as there doesn't seem to be an easy way to uninstall Drush via the main method (), which didn't seem to work for me. composer global remove drush/drush does appear to run successfully.  Thanks in advance.
55040
We are in the process of implementing a new CMS (Drupal 6.x) that runs on MySQL. We have two data centers -- primary and secondary -- with known latency between them. We're unsure which version of MySQL we will run ... either Community or Enterprise, but that is a TBD. Looks like we will be running the InnoDB engine, OS is going to be RedHat EL 5.5 The primary servers are going to be active, while the secondary will be passive or hot stand-bys.   I would like to implement replication, high availability and automated failover in MySQL across the two data centers.   After a failover to the secondary servers, when we fail-back to the primary servers, we'd like to have data synched from the secondary DB to the primary DB quickly and completely so that we can continue to serve content from the primary servers.  I am interested in knowing what technologies/tools/best practices can be used to solve/address these issues. Also, any gotchas or ah-ha moments would be much appreciated as well. I've read up on MySQL replication, clustering, and at some 3rd party tools like Tungsten and Dolphinics, but I a unsure what the is best course of action.  Thank you for your time!  KM
2806
My schema 'test' has 3 tables: 'user', 'post' and 'revision'.  CREATE TABLE IF NOT EXISTS `test`.`user` (   `iduser` INT UNSIGNED NOT NULL AUTO_INCREMENT,   `name` VARCHAR(45) NOT NULL,    PRIMARY KEY (`iduser`)) ENGINE = InnoDB;  CREATE TABLE IF NOT EXISTS `test`.`post` (   `idpost` INT UNSIGNED NOT NULL AUTO_INCREMENT,   `iduser` INT UNSIGNED NOT NULL,   `content` VARCHAR(4000) NOT NULL,   `revision_count` INT NOT NULL DEFAULT 0,    PRIMARY KEY (`idpost`),    INDEX `fk_post_user1_idx` (`iduser` ASC),    CONSTRAINT `fk_post_user1`      FOREIGN KEY (`iduser`)      REFERENCES `test`.`user` (`iduser`)      ON DELETE NO ACTION      ON UPDATE NO ACTION) ENGINE = InnoDB;  CREATE TABLE IF NOT EXISTS `test`.`revision` (   `idrevision` INT UNSIGNED NOT NULL,   `iduser` INT UNSIGNED NOT NULL,   `idpost` INT UNSIGNED NOT NULL,   `content` VARCHAR(4000) NOT NULL,    UNIQUE INDEX `index1` (`idpost` ASC, `idrevision` ASC),    PRIMARY KEY (`idrevision`, `iduser`),    INDEX `fk_revision_user1_idx` (`iduser` ASC),    CONSTRAINT `fk_revision_post`      FOREIGN KEY (`idpost`)      REFERENCES `test`.`post` (`idpost`)      ON DELETE NO ACTION      ON UPDATE NO ACTION,    CONSTRAINT `fk_revision_user1`      FOREIGN KEY (`iduser`)      REFERENCES `test`.`user` (`iduser`)      ON DELETE NO ACTION      ON UPDATE NO ACTION) ENGINE = InnoDB;   And there is the script creates data:  INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (1, 'Ann'); INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (2, 'Bob');  INSERT INTO `test`.`post` (`idpost`, `iduser`, `content`, `revision_count`) VALUES (1, 1, 'this is first post', 1);  INSERT INTO `test`.`revision` (`idrevision`, `iduser`, `idpost`, `content`) VALUES (1, 1, 1, 'this is old content of first post');   I create 2 sessions work concurrently. Session 1 works with query:  BEGIN; INSERT INTO revision (idrevision, idpost, iduser, content) VALUES     ((SELECT max_idrevision + 1      FROM (SELECT max(idrevision) AS max_idrevision           FROM revision WHERE idpost = 1) AS anon_1),     1, 2, 'abc xyz');   Now session 2 works:   BEGIN; UPDATE revision SET idrevision=3 WHERE idpost=1 AND iduser =1; -- will hang by lock  -- but with this update UPDATE revision SET content='nwe asdfs' WHERE idpost=1 AND iduser=1; -- not hang   I don't know what's lock mysql used with query insert in session 1? Is it row lock or table lock or anything else ? If it's row lock, why does second update query in session 2 not hang ?
57901
Question  I am installing a LEMP stack on a fresh minimal install of Ubuntu 14.04 LTS.  When I tried to install MySql   sudo apt-get install mysql-server   it returned an error with the following explanation:  mysql-server depends on mysql-server-5.5; however: Package mysql-server-5.5 is not configured yet.   How do I solve this problem?  What I have read  This question is very similar to , however, that question was (incorrectly, I believe) marked as a duplicate of . None of the answers to these two questions solved my problem.   I have also seen . This question was closed for being unreproducible. However, I can reproduce my problem every time I try to install mysql server on a fresh minimal installation of Ubuntu 14.04 (the key word being minimal).   Purpose of this question  I finally solved my problem, but I could not add an answer to any of the questions I linked to above, so I am creating a new question here so that I can answer it myself.
45597
I just installed Ubuntu 12.10 (amd64), and want to install a recent version of MySQL 5.6.  If possible, I would like to install (not upgrade) it the "Debian Way' (i.e., using apt-get or dpkg).
119956
How can I move MySQL tables from one physical server to another?  Such as this exact scenario:  I have a MySQL server that uses innodb table and is about 20GB size.  I want to move it to a new server, what's the most efficient way to do this?
112412
WAMP installed fine, no problems, BUT...  When going to phpMyAdmin, I get the error from phpMyAdmin as follows:  Cannot load mysqli extension. Please check your PHP configuration   Also, phpMyAdmin documentation explains this error message as follows:     To connect to a MySQL server, PHP needs a set of MySQL functions   called "MySQL extension". This extension may be part of the PHP   distribution (compiled-in), otherwise it needs to be loaded   dynamically. Its name is probably mysql.so or php_mysql.dll.   phpMyAdmin tried to load the extension but failed. Usually, the   problem is solved by installing a software package called "PHP-MySQL"   or something similar.   Finally, the apache_error.log file has the following PHP warnings (see the mySQL warning):  PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0 PHP Warning: Zend Platform does not support this version of PHP - please upgrade to the latest version of Zend Platform in Unknown on line 0 PHP Warning: Zend Debug Server does not support this version of PHP - please upgrade to the latest version of Zend Debug Server in Unknown on line 0 PHP Warning: gd wrapper does not support this version of PHP - please upgrade to the latest version of gd wrapper in Unknown on line 0 PHP Warning: java wrapper does not support this version of PHP - please upgrade to the latest version of java wrapper in Unknown on line 0 PHP Warning: mysql wrapper does not support this version of PHP - please upgrade to the latest version of mysql wrapper in Unknown on line 0   So, for some reason PHP is not recognizing the mysql extension.  Anyone know why? Any solution or workaround?
7858
I've been managing server installations both on and off Ubuntu flavor for some time - I've become quite adjusted to /etc/init.d/ for restarting servcies. Now I get this message:  root@tatooine:~# /etc/init.d/mysql status Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql status  Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the status(8) utility, e.g. status mysql mysql start/running, process 14048   This seems to have been brought about in the latest LTS of Ubuntu - why? What's so bad about /etc/init.d/ and what/is there a difference between service and /etc/init.d/?
19729
I'm running ubuntu 14.04. I cannot use software center to install anything, even a local deb package so I have to rely on Terminal.  Recently I was trying to install mysql-server which generated error which I could pin-point was the required version of libstdc++6 . My system had 4.8.x while mysql 5.6 required >=4.9. Trying the usual upgrading process and unsuccessful, I consulted my sys admin, who tried installing the 4.9 package manually(using a local .deb package), which failed as well citing unmet dependencies.   At present, what I have is a system with error saying no new software can be installed.  The sudo apt-get install -f gives following output:  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... failed. The following packages have unmet dependencies:  libstdc++6 : Depends: gcc-4.9-base (= 4.9.2-10) but 4.9.1-0ubuntu1 is installed  libstdc++6:i386 : Depends: gcc-4.9-base:i386 (= 4.9.2-10) but 4.9.1-0ubuntu1 is installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   I checked for held packages using  dpkg -l | grep ^h dpkg -l | grep hold   Result: nothing.  Also tried to find the broken package, if any but the file  /var/log/dist-upgrade/apt.log doesn't exist.  So, what should/can I do now.
50859
I installed Ubuntu 15.04, but I need to use PHP 5.5 and in 15.04 the standard is PHP 5.6  I added the PPA:  sudo add-apt-repository ppa:ondrej/php5   But when I tried to install, I got:  The following packages have unmet dependencies:       php5-mcrypt : Depends: phpapi-20121212 Depends: php5-common (= 5.5.24+dfsg-1+deb.sury.org~vivid+1)  but 5.6.4+dfsg-4ubuntu6 is to be installed   How should I proceed?
19781
I have located where the error message originates from it is in  line number 221. As I have only a single nvidia driver installed I suspect it is is the same issue. I am not a developer but looking at the code preceding this line I can see the statement.  const char *glob_pattern = "/usr/lib/nvidia-[1-9][0-9][0-9]"  this will pick up nvidia-352/ nvidia-361/ and nvidia-361-prime/ ? on my PC.