Mysql error while reading greeting packet

Ответили на вопрос 1 человек. Оцените лучшие ответы! И подпишитесь на вопрос, чтобы узнавать о появлении новых ответов.

Здравствуйте! Пытаюсь зайти в phpmyadmin, но он выдаёт ошибку mysqli_real_connect(): (HY000/2002). Лог openserver’а показывает вот это:

spoiler

2019-07-17 11:07:12 0 [Note] c:ospanelmodulesdatabaseMariaDB-10.3-x64binmysqld.exe (mysqld 10.3.13-MariaDB) starting as process 1148 …
2019-07-17 11:07:12 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-07-17 11:07:12 0 [Note] InnoDB: Uses event mutexes
2019-07-17 11:07:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-17 11:07:12 0 [Note] InnoDB: Number of pools: 1
2019-07-17 11:07:12 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-07-17 11:07:12 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-07-17 11:07:12 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-17 11:07:12 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=84399922
2019-07-17 11:07:23 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-07-17 11:07:23 0 [Note] InnoDB: Removed temporary tablespace data file: «ibtmp1»
2019-07-17 11:07:23 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-17 11:07:23 0 [Note] InnoDB: Setting file ‘c:ospaneluserdataMariaDB-10.3-x64ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
2019-07-17 11:07:23 0 [Note] InnoDB: File ‘c:ospaneluserdataMariaDB-10.3-x64ibtmp1’ size is now 12 MB.
2019-07-17 11:07:23 0 [Note] InnoDB: Waiting for purge to start
2019-07-17 11:07:23 0x279c InnoDB: Assertion failure in file d:winx64-packagesbuildsrcstorageinnobaseincludefut0lst.ic line 85
InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-…
InnoDB: about forcing recovery.
190717 11:07:23 [ERROR] mysqld got exception 0x80000003 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.3.13-MariaDB
key_buffer_size=26214400
read_buffer_size=2097152
max_used_connections=0
max_threads=65537
thread_count=4
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 29271 K bytes of memory
Hope that’s ok; if not, decrease some variables in the equation.

Thread pointer: 0x24ef7853dd8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong…
mysqld.exe!my_parameter_handler()
mysqld.exe!strxnmov()
mysqld.exe!strxnmov()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
2019-07-17 11:07:23 0 [Note] InnoDB: 10.3.13 started; log sequence number 84399931; transaction id 7599329634443862051
2019-07-17 11:07:23 0 [Note] InnoDB: Loading buffer pool(s) from c:ospaneluserdataMariaDB-10.3-x64ib_buffer_pool
mysqld.exe!parse_user()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0):
Connection ID (thread ID): 1
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on

The manual page at dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2019-07-17 11:07:23 0 [Note] Plugin ‘FEEDBACK’ is disabled.
2019-07-17 11:07:23 0 [Note] Server socket created on IP: ‘127.0.0.1’.

В чём может быть проблема?

While connecting to MySql, I am getting an error MySql server has gone away

on this line $db = mysqli_connect("localhost:9080","root","XXXX");

Here is my code.

<?php
  ini_set('mysql.connect_timeout', 300);
  ini_set('default_socket_timeout', 300);
  define('DB_SERVER', 'localhost:9080');
  define('DB_USERNAME', 'root');
  define('DB_PASSWORD', '');
  define('DB_DATABASE', 'api');
   //$db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD);
   $db = mysqli_connect("localhost:9080","root","");
  // Check connection
  if (!$db) 
  {
    die("Connection failed: " . mysqli_connect_error());
  }
  $select_db = mysqli_select_db($connection, DB_DATABASE);
  if(!$select_db)
  {
    die("Database selection failed: " . mysqli_error($db));
  }
  echo "Connected successfully";
?>

I’ve tried to add

ini_set('mysql.connect_timeout', 300);
ini_set('default_socket_timeout', 300);

And updated max_allowed_Packet to 16 M.

Then Restart all Services.

Error Screenshot: http://imgur.com/a/2B4Rg

Answer 1

Your connection to the database saved the connection handle/object in a variable called $db but your attempt to select a database to use attempts to use a variable called $connection So its just a copy/paste TYPO really.

<?php
define('DB_SERVER', 'localhost:9080');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'api');
$db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD);
// Check connection
if (!$db) {
    die("Connection failed: " . mysqli_connect_error());
}
//$select_db = mysqli_select_db($connection, DB_DATABASE);
//               the error      ^^^^^^^^^^^
$select_db = mysqli_select_db($db, DB_DATABASE);
if(!$select_db) {
    die("Database selection failed: " . mysqli_error($db));
}
echo "Connected successfully";
?>

Small Note

You can accomplish a connection and a database selections all in the mysql_connect() function using the 4th parameter like this.

The mysqli_db_select() function in MySQL is really there for when you want to select a different database at some point in the normal flow of your script, and not for use when initially connection to a database.

<?php
define('DB_SERVER', 'localhost:9080');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'api');
$db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
// Check connection
if (!$db) {
    die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>

From comments below…..

By default MySQL runs on port 3306, MariaDB runs on 3307 in WAMPServer.

So change

define('DB_SERVER', 'localhost:9080');

To either

define('DB_SERVER', 'localhost:3306');  // default MYSQL

or

define('DB_SERVER', 'localhost:3307');  // default MariaDB

You can also now remove the

ini_set(‘mysql.connect_timeout’, 300);

ini_set(‘default_socket_timeout’, 300);

and revert the max_allowed_Packet back to its default

Содержание

  1. The script encountered an error while running an AJAX request. #222
  2. Comments
  3. Облачный сервер SQL / MySQL выходит из строя после развертывания в Google Cloud
  4. Облачный сервер SQL / MySQL выходит из строя после развертывания в Google Cloud
  5. forum.lissyara.su
  6. MySQL сервер не работает для удаленного доступа
  7. MySQL сервер не работает для удаленного доступа
  8. Услуги хостинговой компании Host-Food.ru
  9. Re: MySQL сервер не работает для удаленного доступа
  10. Re: MySQL сервер не работает для удаленного доступа
  11. Re: MySQL сервер не работает для удаленного доступа
  12. Re: MySQL сервер не работает для удаленного доступа
  13. Re: MySQL сервер не работает для удаленного доступа
  14. Re: MySQL сервер не работает для удаленного доступа
  15. Re: MySQL сервер не работает для удаленного доступа
  16. Re: MySQL сервер не работает для удаленного доступа
  17. Re: MySQL сервер не работает для удаленного доступа
  18. Re: MySQL сервер не работает для удаленного доступа
  19. Почему нет соединения с mysql в openserver?

The script encountered an error while running an AJAX request. #222

Hi support team,

I am having the trouble of getting the error «The script encountered an error while running an AJAX request.» on my database which is huge and has 1.1G size.

I am trying to do a clone copy of my site by cloning database and try to rename strings. While search/replace database string after a while the failure message «The script encountered an error while running an AJAX request.» is displayed.

I am using PHP Version 5.6.30 and even have tried other forum info for solving i.e. #130 and also checked that the WP_DEBUG is false (helped me only to improve the checked table amount a bit, but still stuck not all are inspected) and php-mbstring is enabled too.

As I am unfamilar with using cli commands I am not sure how to use them, because unsuccessful to proceed with this command i.e. [text] = plase holder as secure date not submitted within this thread

php srdb.cli.php –h, [ip address] –n, [database] –u, [db user] –p, [user pw]
Error message Screen shot > https://www.screencast.com/t/I7JYAwVBrf

Additionaly I have asked server support and they state this has noting to do with server it is a script failure. «We have checked using the commands provided in readme file , but unfortunately the issue is still persisting. The issue seems to be related with the scripts. It is better to contact your script developer in this case.»

Please be so kind and help me to solve the issue not able to run the script proper to the end.

The text was updated successfully, but these errors were encountered:

Источник

Облачный сервер SQL / MySQL выходит из строя после развертывания в Google Cloud

У меня есть приложение Google App Engine, которое отлично работает при локальном запуске с помощью localhost:8080 , но после развертывания в облаке с помощью gcloud app deploy я получаю следующую ошибку:

Есть идеи, почему это происходит?

Я обнаружил причину, по которой мое приложение Google App Engine (GAE) работало правильно на локальном хосте, но выдавало ошибку MySQL server has gone away после развертывания на [PROJECT-ID].appspot.com.

Причина в том, что мое приложение подключалось к экземпляру Cloud SQL в другом проекте, и для этого вы должны предоставить учетной записи службы appengine по умолчанию ([PROJECT-ID]@appspot.gserviceaccount.com) один из следующих IAM роли:

  • Облачный SQL-клиент
  • Облачный редактор SQL
  • Администратор облачного SQL

После того, как я добавил учетную запись службы App Engine по умолчанию в качестве роли Cloud SQL Client в проект, содержащий экземпляр Cloud SQL, все заработало отлично.

Источник

Облачный сервер SQL / MySQL выходит из строя после развертывания в Google Cloud

У меня есть приложение Google App Engine, которое отлично работает при локальном запуске с помощью localhost:8080 , но после развертывания в облаке с помощью gcloud app deploy я получаю следующую ошибку:

Есть идеи, почему это происходит?

Я обнаружил причину, по которой мое приложение Google App Engine (GAE) работало правильно на локальном хосте, но выдавало ошибку MySQL server has gone away после развертывания на [PROJECT-ID].appspot.com.

Причина в том, что мое приложение подключалось к экземпляру Cloud SQL в другом проекте, и для этого вы должны предоставить учетной записи службы appengine по умолчанию ([PROJECT-ID]@appspot.gserviceaccount.com) один из следующих IAM роли:

  • Облачный SQL-клиент
  • Облачный редактор SQL
  • Администратор облачного SQL

После того, как я добавил учетную запись службы App Engine по умолчанию в качестве роли Cloud SQL Client в проект, содержащий экземпляр Cloud SQL, все заработало отлично.

Источник

forum.lissyara.su

Каждые 14 миллиардов лет учёные запускают андронный коллайдер

MySQL сервер не работает для удаленного доступа

Модератор: terminus

MySQL сервер не работает для удаленного доступа

Непрочитанное сообщение Гость » 2009-10-25 13:42:41

и так всякий раз когда приходитзапрос с удаленного сервера.
Если запрос приходит с локального сервера — то все в норме.

sockstat | grep mysql
говорит, что mysql слушает коннекты на нужном ип и порту.

вот конфиг файл my.cnf

Услуги хостинговой компании Host-Food.ru

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Непрочитанное сообщение Гость » 2009-10-25 16:29:02

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Re: MySQL сервер не работает для удаленного доступа

Опишу всю историю её развития:
минимальная инсталляция на VDS (7.2)
Скачиваются порты
Ставятся из исходников php-fpm и патчится исходники PHP5.3 + удовлетворение всех зависимостей (GCC libxml libicnov и т.п.)
DenyHost и соответственно inetd
установка из портов nginx и его последующий тюнинг
настройка связки nginx и связки fscgi-php
установка из портов/пакетов mysql ну и далее вы знаете.
настройка bind как secondary DNS сервер.

Ядро не перекомпилировалось, хотя возможно какие-то изменения вносились (в виде подгрузки модулей и тп.). Мир аналогично.
Вроде вся предыстория.

Источник

Почему нет соединения с mysql в openserver?

2019-07-17 11:07:12 0 [Note] c:ospanelmodulesdatabaseMariaDB-10.3-x64binmysqld.exe (mysqld 10.3.13-MariaDB) starting as process 1148 .
2019-07-17 11:07:12 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-07-17 11:07:12 0 [Note] InnoDB: Uses event mutexes
2019-07-17 11:07:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-17 11:07:12 0 [Note] InnoDB: Number of pools: 1
2019-07-17 11:07:12 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-07-17 11:07:12 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-07-17 11:07:12 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-17 11:07:12 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=84399922
2019-07-17 11:07:23 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-07-17 11:07:23 0 [Note] InnoDB: Removed temporary tablespace data file: «ibtmp1»
2019-07-17 11:07:23 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-17 11:07:23 0 [Note] InnoDB: Setting file ‘c:ospaneluserdataMariaDB-10.3-x64ibtmp1’ size to 12 MB. Physically writing the file full; Please wait .
2019-07-17 11:07:23 0 [Note] InnoDB: File ‘c:ospaneluserdataMariaDB-10.3-x64ibtmp1’ size is now 12 MB.
2019-07-17 11:07:23 0 [Note] InnoDB: Waiting for purge to start
2019-07-17 11:07:23 0x279c InnoDB: Assertion failure in file d:winx64-packagesbuildsrcstorageinnobaseincludefut0lst.ic line 85
InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-.
InnoDB: about forcing recovery.
190717 11:07:23 [ERROR] mysqld got exception 0x80000003 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.3.13-MariaDB
key_buffer_size=26214400
read_buffer_size=2097152
max_used_connections=0
max_threads=65537
thread_count=4
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 29271 K bytes of memory
Hope that’s ok; if not, decrease some variables in the equation.

Thread pointer: 0x24ef7853dd8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong.
mysqld.exe!my_parameter_handler()
mysqld.exe!strxnmov()
mysqld.exe!strxnmov()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
2019-07-17 11:07:23 0 [Note] InnoDB: 10.3.13 started; log sequence number 84399931; transaction id 7599329634443862051
2019-07-17 11:07:23 0 [Note] InnoDB: Loading buffer pool(s) from c:ospaneluserdataMariaDB-10.3-x64ib_buffer_pool
mysqld.exe!parse_user()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0):
Connection ID (thread ID): 1
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on

Источник

Понравилась статья? Поделить с друзьями:
  • Mysql error safe update mode
  • Mysql error number 1267
  • Mysql error number 1130
  • Mysql error number 1114
  • Mysql error number 1062