MAMP mysql update fails - mamp

When I try to start my mysql and apache servers through MAMP on macOS, I get a message every time saying that mysql needs to be updated.
I try to update mysql through the MAMP interface, but it errors out with this:
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: /Applications/MAMP/Library/bin/mysql
Looking for 'mysqlcheck' as: /Applications/MAMP/Library/bin/mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
How do I fix this so that I can start my servers properly?
EDIT for clarity: I appreciate the link to the other thread. Very similar but I still need help with getting MAMP to update mysql. When I try /Applications/MAMP/Library/bin/mysql_upgrade --port=3306 -u root -p in the terminal as suggested in that post I get:
Looking for 'mysql' as: /Applications/MAMP/Library/bin/mysql
Looking for 'mysqlcheck' as: /Applications/MAMP/Library/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--port=3306'
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats
Error : Table 'mysql.innodb_index_stats' doesn't exist
status : Operation failed
mysql.innodb_table_stats
Error : Table 'mysql.innodb_table_stats' doesn't exist
status : Operation failed
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slave_master_info
Error : Table 'mysql.slave_master_info' doesn't exist
status : Operation failed
mysql.slave_relay_log_info
Error : Table 'mysql.slave_relay_log_info' doesn't exist
status : Operation failed
mysql.slave_worker_info
Error : Table 'mysql.slave_worker_info' doesn't exist
status : Operation failed
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Repairing tables
mysql.innodb_index_stats
Error : Table 'mysql.innodb_index_stats' doesn't exist
status : Operation failed
mysql.innodb_table_stats
Error : Table 'mysql.innodb_table_stats' doesn't exist
status : Operation failed
mysql.slave_master_info
Error : Table 'mysql.slave_master_info' doesn't exist
status : Operation failed
mysql.slave_relay_log_info
Error : Table 'mysql.slave_relay_log_info' doesn't exist
status : Operation failed
mysql.slave_worker_info
Error : Table 'mysql.slave_worker_info' doesn't exist
status : Operation failed
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
ERROR 1146 (42S02) at line 62: Table 'mysql.innodb_table_stats' doesn't exist
ERROR 1243 (HY000) at line 63: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 64: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 66: Table 'mysql.innodb_index_stats' doesn't exist
ERROR 1243 (HY000) at line 67: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 68: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 81: Table 'mysql.slave_relay_log_info' doesn't exist
ERROR 1243 (HY000) at line 82: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 83: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 110: Table 'mysql.slave_master_info' doesn't exist
ERROR 1243 (HY000) at line 111: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 112: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 128: Table 'mysql.slave_worker_info' doesn't exist
ERROR 1243 (HY000) at line 129: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 130: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 1896: Table 'mysql.slave_master_info' doesn't exist
ERROR 1146 (42S02) at line 1897: Table 'mysql.slave_master_info' doesn't exist
ERROR 1146 (42S02) at line 1898: Table 'mysql.slave_master_info' doesn't exist
ERROR 1146 (42S02) at line 1899: Table 'mysql.slave_worker_info' doesn't exist
ERROR 1146 (42S02) at line 1900: Table 'mysql.slave_relay_log_info' doesn't exist
ERROR 1146 (42S02) at line 1904: Table 'mysql.innodb_table_stats' doesn't exist
ERROR 1146 (42S02) at line 1908: Table 'mysql.innodb_index_stats' doesn't exist
FATAL ERROR: Upgrade failed
I also tried finding the my.cnf file for MAMP and backing it up as someone else in the other thread suggested but could not find it. If someone would not mind pointing out to me where it is, so that I can see if updating mysql after that works.
I will also add that I am using MAMP version 4.2 on macOS 10.12. If that helps any.

Related

Postgresql : ERROR: syntax error at or near "\"

I am trying to load a .sql dump file using pgAdmin. However getting the following error :
ERROR: syntax error at or near "\"
LINE 2757: \.
^
SQL state: 42601
Character: 68298
It looks like this in code :
Even if I delete it, it gets the same error in next \.
If I delete all, gives another error.

failed to open file 'load_departments.dump'; error: 2

I am trying to import a the employees.sql database from GitHub but I get the following error message
ERROR at line 113: Failed to open file 'load_departments.dump', error:
2
I am importing the database using the 'Data Import' option from the 'Server' drop down menu.

bucardo sync issue, function does not exist

I have issues with adding database to sync. DB versions: PostgreSQL 9.6.8 (RDS), Jump system: Ubuntu18.04 LTS, bucardo version: 5.4.1.
When trying run this command:
bucardo add sync db_sync relgroup=copying_herd dbs=source_db:source,dest_db:target onetimecopy=1
I receive this error:
WARNING: Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=dc_sourcedb;host=xxx.aaa.xyz;port=5432 at line 126.
Failed to add sync: DBD::Pg::st execute failed: ERROR: DBD::Pg::db do failed: ERROR: function search_string(text) does not exist
LINE 5: array_agg(search_string(x)),
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY:
SELECT
coalesce(
array_to_string(
array_agg(search_string(x)),
'|'
)::text,
''
)
FROM unnest($1) x
CONTEXT: SQL function "flatten_text_array" during inlining at line 126. at line 30.
CONTEXT: PL/Perl function "validate_sync" at /usr/bin/bucardo line 4612.
Function search_string exist and I can run this function from psql command line

error when running anonymous block

running into the below error when trying to run a simple anonymous block
do $$ begin raise notice 'Hello, World!'; end $$;
error
Describe Error: Failed to retrieve EXPLAIN plan(s): ERROR: syntax
error at or near "do"
DB is PostgreSQL 9.1.18 on x86_64-unknown-linux-gnu
any ideas on what is going wrong?
I am using aqua data studio and pgadmin and get the same error

BigSQL PostgreSQL CREATE EXTENSION errors

I have windows 8.1 and I want to try hadoop_fdw. Problem is with loading the extension with:
CREATE EXTENSION hadoop_fdw;
ddssdg
ERROR: could not load library "D:/PROGRA~2/POSTGR~2/pg95/../pg95/lib/postgresql/hadoop_fdw.dll": unknown error 126
********** Error **********
ERROR: could not load library "D:/PROGRA~2/POSTGR~2/pg95/../pg95/lib/postgresql/hadoop_fdw.dll": unknown error 126
SQL state: XX000
I tried to create extension manually from SQL located at "D:\Program Files\PostgreSQLBigsql\pg95\share\postgresql\extension"
CREATE FUNCTION hadoop_fdw_handler()
RETURNS fdw_handler
AS 'D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll'
LANGUAGE C STRICT;
CREATE FUNCTION hadoop_fdw_validator(text[], oid)
RETURNS void
AS 'D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll'
LANGUAGE C STRICT;
CREATE FOREIGN DATA WRAPPER hadoop_fdw
HANDLER hadoop_fdw_handler
VALIDATOR hadoop_fdw_validator;
I get this error same error again:
ERROR: could not load library "D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll": unknown error 126
********** Error **********
ERROR: could not load library "D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll": unknown error 126
SQL state: XX000
What I am doing wrong?
EDIT 1: So I found missing DLL's. They are:
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
JVM.DLL
I added them to C:\Windows\SysWOW64\ and extension still doesn't work - it probably requires restart.