Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [mysql]

An open-source, relational database management system.

Filter by
Sorted by
Tagged with
-1
votes
5answers
5k views

Use a password in shell-script

I want to create a cron script to interact with mysql, for example #!/bin/bash mysql -uroot -p echo root echo "CREATE DATABASE example" But it doesn't work, it only prompts: Enter password: and ...
1
vote
1answer
794 views

can we save mysql error to a file? [duplicate]

I would like to know is there any way to log the mysql query error which prints on screen. Example: mysql -u$UserName -p$Password -D $DBName -e "ALTER TABLE collect ADD path VARCHAR( 250 ) NOT ...
0
votes
1answer
142 views

Terminal Error While Installing PyMySQL

I'm working on a project with the Raspberry Pi that involves connecting it to a MySQL database. After doing some research, I have found PyMySQL to be what I need to install through the terminal. I've ...
0
votes
1answer
50 views

Rolling back changes made by source command

I wanted to give the colorization of MySQL environment a go, so I searched the internet and found this page: mysql-colorize I followed both of the two directions and it is now working fine. As I ...
1
vote
1answer
755 views

Reroute mysql connection through external machine

I want (as a first step towards an external mysql proxy) reroute traffic from the local connection of mysql (on a VM) to an external proxy (on the host) which then routes it back to the VM which will ...
-2
votes
1answer
330 views

CentOS 7 Cannot Install MySQL 5.7 nothing I have done works still trys to instll mariadb

I have followed just about every instruction, including the instruction from MySQL and following instrucitons from around web including this site. I have downloaded the mysql57-community-release-el7-...
6
votes
2answers
6k views

Debian 9: After upgrade from 8, MySQL (MariaDB) does no longer work

I just upgraded from Debian 8 to 9. Apparently, it breaks everything database related. I now can't start MySQL, the error is: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/...
0
votes
2answers
390 views

Can't connect to local MySQL server through socket

All commands in debian9's interactive non-login shell (graphical mode). I want to backup mysql before reboot or shutdown. who test tty7 2018-02-01 18:26 (:0) test@world:~$ pwd /home/test ...
0
votes
1answer
88 views

No package mysql-community *5.7*

I am very new to Cent Os. I have to install mysql on my cent os 6.9 version. I have tried almost all commands,But am getting one or the other issue while installing. yum localinstall https://dev....
1
vote
1answer
289 views

Iptables blocking remote MySQL remote

I'm trying to set my server (CentOS 6.9) to accept remote MySQl connections and I'm stuck on the firewall config. I have everything set right on the MySQL side; I can connect through telnet if I stop ...
0
votes
1answer
764 views

Confused about using the Zabbix Template MySQL (800+ items)

Please explain the full use of this template.link template I searched very much on Google, I have configured as described but i can't use this yet. Can you fully explain? i have two centos 7. zabbix ...
0
votes
0answers
159 views

zabbix template mysql (800+item)

I use this template. template-mysql-800-items when i send parameter by this command zabbix_sender -z zabbix -s db1 -k mysql[innodb_queries_inside] -o 100 -vv On zabbix server i can see result. ...
0
votes
1answer
868 views

Slow server performance - mod_fcgid causing (104), (09) and (32) errors: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function

I'm having trouble with tracking the source of slow web server performance for wordpress site and non-cached pages. Server OS: Debian 8 "Jesssie)" - Linux version 4.9.58-xxxx-std-ipv6-64 (kernel@...
0
votes
1answer
627 views

zabbix_sender error

What is the meaning of this error? [root@db2 zabbix]# zabbix_sender -z zabbix -s zabbix -k mysql[Threads_running] -o 100 -vv zabbix_sender [55944]: DEBUG: answer [{"response":"success",...
1
vote
2answers
709 views

Create a user and DB with the same name in one line

This is how I create a MySQL authorized, all privileged DB user and a corresponding DB instance with the same name, directly from Bash: echo "CREATE USER "${domain}"@"localhost" IDENTIFIED BY \"${...
1
vote
2answers
3k views

MySQL High Ram Usage?

I'm trying to figure out what's using my RAM. I did some checks and it looks like that mysqld is causing high RAM usage. The output of free -g, htop, top, showprocesslist; isn't much helping. free -g ...
2
votes
1answer
6k views

MySQL/Maria Database not loading: /var/run/mysqld/mysqld.sock (2 “No such file or directory”)

Setup Server computer Distro: Raspbian GNU/Linux 8 Kernel: 4.9.35-v7+ armv7l (32 bit) My MySQL database is not loading admin@Xroklaus:~ $ sudo systemctl status mysql ● mysql.service - LSB: Start ...
3
votes
2answers
6k views

How to grant a “no-root-user” rights to start/stop/restart mysql server on suse machine?

Is it possible to grant priviliges to a "no-root-user" to start and/stop/restart the mysql server on a suse machine? The goal is to make it for a developer possible to tune a mysql server/database ...
6
votes
3answers
8k views

How to compress a mysql dump using 7z via a pipe?

I've been attempting to compress my mysqldump output via 7z using the pipe operator (I have seen this question, but its answer uses xz not 7z). This is what I have tried so far: mysqldump -u root -p ...
0
votes
2answers
53 views

Source multiple sql files with blank in name

I'm actually blocking on a stupid thing ... yet i can't get it throught. We've got a git repository on which we have our php files and our sql patch. Every time i update my repo, i have to check if ...
0
votes
0answers
90 views

In dovecot, what syntax to use if I have a space in mysql password?

I'm trying to configure Dovecot to access mysql, but it's not working because there is a space in the mysql password. driver = mysql connect = "host=localhost dbname=postfix user=postfix password=...
2
votes
1answer
4k views

broken packages when installing mysql 5.6 using apt-get [closed]

I am trying to install mySql 5.6 on my Linux machine. I tried >apt-get install mysql-server-5.6 but I am getting the following error: mysql-server-5.6 : Depends: mysql-common (>= 5.6.22-1~)...
2
votes
1answer
514 views

Install MySQL in the Debian Jessie (8)

I'm new in Linux, freshly installed a Debian Jessie (8) OS and need to work with MySQL. The hostname is, hostname -f It prints, debian8 When I type in the terminal, sudo dpkg --get-selections ...
0
votes
2answers
2k views

Autostarting a python script whenever it crashes

I am trying to autostart a python script everytime it crashes on my raspberry pi. I am adhering to the shell script solution offered here: https://raspberrypi.stackexchange.com/questions/14735/how-do-...
8
votes
5answers
29k views

Suppress warning messages from MySQL in shell script but allow errors

My log files are getting dumped with following message while running shell scripts using some underlying MySQL commands. Here is the message: "Warning: Using a password on the command line ...
0
votes
0answers
55 views

MySQL installation in Debian Jessie (8) [duplicate]

I was following a video about how to install the MySQL database in the Debian 8 from youtube, https://www.youtube.com/watch?v=Qg_wb_eZOrk It was the point when I tried to install MySQL server using ...
-1
votes
1answer
1k views

Variable won't get expanded when INSIDE mysql shell

Before creating a new mysql user and DB, I did: read sps -s # Inputing and saving the sps (password) value. echo ${sps} # sps password value echoed. mysql -u root -p[PASSWORD] mysql>...
1
vote
1answer
470 views

How to pass an argument containing double quote to a shell script function?

I have in pull_news.sh (variable declarations omitted): dump_table () { mysqldump --user=${REMOTE_USERNAME} --password=${REMOTE_PASSWORDS} --host=${REMOTE_HOST} --port=${REMOTE_PORT} --single-...
0
votes
2answers
214 views

mysql dump fails when done by root user

In Ubuntu server 16.04 xenial in a LEMP stack I executed mysql -u root -p (then root's password), and then, when inside the mysql shell: mysqldump --databases "${domain}" > test.sql but for some ...
0
votes
1answer
47 views

How could I restrict users to connecting to MySQL using only their unix username?

I'm working in an environment where I need to ensure that developers only connect to our application's MySQL database using the username of their Unix account. The driver behind this is to have ...
1
vote
1answer
92 views

Exporting and importing a mysqldump from within a mysql CLI heredocument

The following code drops a DB user and a DB instance by the name of test, if both exists, then creates an authorized, all privileged DB user and a DB instance with the same name (also test). mysql -u ...
4
votes
2answers
304 views

How to pause MySQL before taking an LVM/ZFS snapshot?

How can I instruct MySQL to complete all "in-progress" transactions, but to delay starting new ones (without kicking clients off) until I have taken a ZFS or LVM snapshot (which takes less than a ...
2
votes
1answer
562 views

OOM Killer keeps killing mysqld

I run a CentOS vps to host a few websites with cPanel/WHM but every now and then, my websites stop working because it can't establish a connection to the mysql database. Looking at the messages log, ...
1
vote
1answer
134 views

Change MySql root password

Is this correct to change the root password of MySql? echo "use mysql; update user set password=PASSWORD("NEWPASSWORD") where User='root'; flush privileges; quit;" | mysql -u root -pOLDPASSWORD I've ...
-1
votes
2answers
262 views

Changing root mysql password failed when done from mysql CLI

Consider the following code: UPDATE user set password=PASSWORD('NEWPASSWORD_CAME_HERE') WHERE User='root'; Where it is written NEWPASSWORD_CAME_HERE I've putted my password (between the quote marks)....
0
votes
1answer
157 views

backup my debian server to mycloud ex2 every hour

I have a Debian web server with MySQL and I have a 'My Cloud EX2 Ultra'. How can I backup my Debian server to 'My Cloud EX2 Ultra' every hour ? 'My Cloud EX2 Ultra' is a network hard drive . ...
1
vote
2answers
47 views

Mysql CLI - continue execution even if the operation failed

Please consider this code: mysql -u root -p << MYSQL drop user '${test}'@'localhost'; drop database ${test}; create user '${test}'@'localhost' identified by '${psw}'...
0
votes
1answer
29 views

Making create DB user and create DB instance, run over existing values with the same name

I tried to recreate a DB user and a DB instance (run over the existing ones), so I ran the following two commands in the Mysql CLI: create user '${test}'@'localhost' identified by '${psw}'; create ...
0
votes
2answers
240 views

how to import customers to dolibarr

I have a rough and ready table as: mysql> mysql> show tables; +----------------------+ | Tables_in_businesses | +----------------------+ | 2017july | +----------------------+ 1 row ...
1
vote
1answer
695 views

Making mysql CLI ask me for a password interactively

I use the following code as part of a much larger script: mysql -u root -p << MYSQL create user '${DOMAIN}'@'localhost' identified by '${DOMAIN}'; create database ${DOMAIN}; GRANT ...
0
votes
2answers
28 views

Program to instantly host a mysql database from a dump file [closed]

I'm looking for a utility program which can take a dump of a mysql database and basically host a "fake" or minimal mysql server with that data for testing another program which requires it. Has ...
0
votes
1answer
311 views

MySQL on Western Digital NAS

A WD MyCloud device: root@WDMyCloud root # uname -a Linux WDMyCloud 3.10.39 #1 SMP Fri Aug 5 11:16:40 CST 2016 2014T20p4 Build-git3f24b4d armv7l GNU/Linux root@WDMyCloud root # cat /proc/...
14
votes
1answer
1k views

Why does piping to 'tail' change the contents of a line?

When I view the result of a SELECT with MySQL Workbench, it's correct with one single \ max@host 10:13:58: ~$ mysql -h db-master.domain.local -uuser -ppw db -e ' > SELECT > ...
0
votes
1answer
849 views

MySQL Select with function IN () with bash array

How can I do this with an array? (without storing the array as regular variable) VAR='String1 String2 String3' SELECT * FROM db.table WHERE xy IN ( ${VAR// /, } ); not working example: SELECT * ...
1
vote
1answer
24 views

Mysql database doesn't get deleted after deleting a user fully privileged on it

I've created an authorized, all privileged DB user, including a DB with the same name: create user 'test'@'localhost' identified by 'blablabla'; create database test; GRANT ALL PRIVILEGES ON test.* ...
3
votes
3answers
140 views

Preventing any external mysql login tries

How to prevent any external logins to my Mysql database? That is, how to make sure that the only way my database could be manipulated is to login to my machine with SSH and work as root/sudoer. My ...
0
votes
3answers
544 views

How to connect to mysql remotely via SSH tunnel without password

On the server, I've got it set up, that the root doesn't need to enter password in order to use mysql (credentials are in ~/.mylogin.cnf). Now I want to connect to the mysql remotely via SSH tunnel ...
2
votes
1answer
323 views

How Remove permission denied with GRANT USAGE ON mysql

I have a mail server in my ubuntu instance. I have a webserver management FROXLOR and i recieve errors for access denied when i try to login in mail account. The log for this: Aug 16 03:14:33 email ...
1
vote
1answer
188 views

How to associate and authorize a mysql DB user with a mysql DB, in mysql CLI?

In a test environment, I created a user and a DB with the same name this way: create user 'test'@'localhost' identified by 'blablabla'; create database test; When I came to associate the user with ...
1
vote
2answers
30 views

Listing all users in mysql root DB

In mysql CLI I did show databases; I then got a list of all DBs. How could I list all users? show users; didn't work, and I didn't find a command here in a quick search.