I am trying to change a field type in a table. When I run the command
ALTER TABLE `accounts` CHANGE `goldinbank` `goldinbank` BIGINT(20) NOT NULL DEFAULT '0';
and click Save, the operation is not processed, and PMA returns to the table structure without making changes.
Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.7.38 - MySQL Community Server (GPL)
Protocol version: 10
OS: Ubuntu 20.04.4 LTS
Any ideas would be greatly appreciated.
Related
I'm installing MySQL 8 on an Arm EC2 instance and I cannot get it to work with remote connections. Here's the steps I do to install MySQL:
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm --nogpgcheck
yum -y install mysql-community-server --nogpgcheck
I then start MySQL with:
systemctl start mysqld
Then I login as root to MySQL and create a sample database with:
CREATE DATABASE gtfs DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
USE gtfs;
CREATE TABLE agency (
agency_id VARCHAR(255) NOT NULL PRIMARY KEY,
agency_name VARCHAR(255),
agency_url VARCHAR(255),
agency_timezone VARCHAR(255),
agency_lang VARCHAR(255)
);
INSERT INTO agency VALUES ('id', 'name', 'url', 'timezone', 'lang');
So now I have a database created. If I try to connect from a client as root I get ER_HOST_NOT_PRIVILEGED. I've followed along here and created a new user with:
CREATE USER 'lambda'#'%' IDENTIFIED BY 'Password1!';
GRANT ALL ON *.* TO 'lambda'#'%';
and tried it out. I first get ER_NOT_SUPPORTED_AUTH_MODE which I can fix with:
UPDATE mysql.user SET plugin='mysql_native_password' WHERE User='lambda';
And then I'm back getting ER_HOST_NOT_PRIVILEGED with my lambda user. I've also added
bind-address=0.0.0.0
to my /etc/my.cnf file and restarted MySQL with systemctl restart mysqld and it still isn't working.
Running mysql -V outputs
mysql Ver 8.0.28 for Linux on aarch64 (MySQL Community Server - GPL)
Any help is massively appreciated. I'm tearing my hair out at this point. I've checked and I have port 3306 open on the EC2 instance. I cannot figure this out.
I'm trying to import excel file using maatwebsite/excel in Laravel. It's working fine with short number like 1234 of column value. But when I try to import with long number like 123456789 this the column value changed automatically with a random number. I have dd($row['my_column_name']); that output exact value that I put in Excel file; My database column data type varchar(255).
Note: Only problem in Live server (Shared Hosting)
Live Server MariaDB Info:
Server: Localhost via UNIX socket
Server type: MariaDB
Server version: 10.3.28-MariaDB-log-cll-lve - MariaDB Server
Localhost MySQL Info:
Server: localhost via TCP/IP
Server type: MySQL
Server version: 5.7.24 - MySQL Community Server (GPL)
I am deploying a zabbix-server. I created a MySQL database on the a cloud platform. When I start the zabbix-server-mysql:alpine-5.2-latest container which connects to this DB, it automatically exits after a while. The log shows:
* Preparing Zabbix server
** Using MYSQL_USER variable from ENV
** Using MYSQL_PASSWORD variable from ENV
********************
* DB_SERVER_HOST: xxxxx
* DB_SERVER_PORT: 3306
* DB_SERVER_DBNAME: zabbix
********************
** Database 'zabbix' already exists. Please be careful with database COLLATE!
** Creating 'zabbix' schema in MySQL
ERROR 1071 (42000) at line 357: Specified key was too long; max key length is 3072 bytes
** Preparing Zabbix server configuration file
** Updating '/etc/zabbix/zabbix_server.conf' parameter "ListenPort": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "SourceIP": ''...removed
...
** Updating '/etc/zabbix/zabbix_server.conf' parameter "TLSPSKIdentity": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "TLSPSKFile": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "User": 'zabbix'...updated
Starting Zabbix Server. Zabbix 5.2.3 (revision ae46273).
Press Ctrl+C to exit.
8:20210125:093824.714 Starting Zabbix Server. Zabbix 5.2.3 (revision ae46273).
8:20210125:093824.714 ****** Enabled features ******
8:20210125:093824.714 SNMP monitoring: YES
8:20210125:093824.714 IPMI monitoring: YES
8:20210125:093824.714 Web monitoring: YES
8:20210125:093824.714 VMware monitoring: YES
8:20210125:093824.714 SMTP authentication: YES
8:20210125:093824.714 ODBC: YES
8:20210125:093824.714 SSH support: YES
8:20210125:093824.714 IPv6 support: YES
8:20210125:093824.714 TLS support: YES
8:20210125:093824.714 ******************************
8:20210125:093824.714 using configuration file: /etc/zabbix/zabbix_server.conf
8:20210125:093824.946 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
It can connect to MySQL and create some tables including the users table.
When I restart the container, the same error shows up again.
I found https://github.com/zabbix/zabbix-docker/issues/13 and so deduced that it is a problem about the MySQL Database collation (and this matches the warning ** Database 'zabbix' already exists. Please be careful with database COLLATE!)
I solve the problem by re-creating the MySQL database with
charset: utf8
collation: utf8_bin
I met the same problem when I imported a zabbix appliance to KVM. I solved it by dropping the zabbix database in MySQL and create it again and populate it with the DB script according to the zabbix installation documents.
For Zabbix installation using docker, you have to drop the Zabbix database in the MySQL container for this error to be resolved.
Few days ago I have reinstalled my system and installed mariadb as default mysql server. And now i have noticed a problem - whenever I try to create a dump of any database - it is created without data. Inside of dump file most of tables does not have insert query with data and dump file is very small (below 1mb).
I have tried to create dump files in a few ways:
Phpmyadmin export
Command line mysqldump -u user -p databesaname > dumpfile.name
But result is the same. So is there a way to fix this without reinstalling mysql server? I dont want to lose all my databases.
Specifications:
Server: Localhost via UNIX socket
Server Type: MariaDB
Server version: 10.0.34-MariaDB-0ubuntu0.16.04.1 - Ubuntu 16.04
Apache/2.4.18 (Ubuntu)
Databesa client version : libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
PHP version: 7.0.30-0ubuntu0.16.04.1
i have all table of mysql with examp as files now i install ubuntu i want to get databases in ubuntu sql just i had copy mysql from data to var/lib/mysql
but when i brows tables give me this error
/libraries/tbl_columns_definition_form.inc.php#243
Undefined index: Default
Backtrace
./libraries/controllers/table/TableStructureController.php#513: include(./libraries/tbl_columns_definition_form.inc.php)
./libraries/controllers/table/TableStructureController.php#179: PMA\libraries\controllers\table\TableStructureController->displayHtmlForColumnChange(
array,
string 'tbl_structure.php',
)
./tbl_structure.php#49: PMA\libraries\controllers\table\TableStructureController->indexAction()