New answers tagged

0

You forgot to escape the special characters. Elisp-regex is quite backslash heavy since the first \ is swallowed by the lisp string. See https://www.emacswiki.org/emacs/RegularExpression To catch MariaDB and MySQL I have this in my config: (sql-set-product-feature 'mysql :prompt-regexp "^\\(MariaDB\\|MySQL\\) \\[[_a-zA-Z]*\\]> ")


0

I finally solved the issue by logging in as root using: sudo mysql -uroot -p pasword:****** and then exiting mysql> exit and the service started working (and restarting normally). As it seems the service was in a zombie state! Even though reported as not running by systemd it was actually running because I was able to login with root and issue a show ...


0

You can use the dos2unix tool to convert the line endings to the unix format: $ sudo apt-get install dos2unix $ dos2unix /path/to/my.cnf and see if this fixes the issue, now that its done. Probably when you opened the file with notepad or some other editor, it asked you to convert the line endings to windows compatible and you selected yes.


2

phpMyAdmin is a tool written in PHP to help you administrate a MySQL/MariaDB database server. The XAMPP development suite that you have installed on your Windows system already install and include all the required components and dependencies for both the MySQL database server and the phpMyAdmin application. As you already installed the MySQL database server ...


1

While you can do mysql queries/updates/etc in a shell script, it's far easier to use a language (like perl or python) with good support for both databases and CSV files. Here's one way of doing it in perl, using the perl DBI module, and the DBD::CSV and DBD::mysql modules. It reads each row from your CSV file (i've called it 'updates.csv' and assumed the ...


0

You can use this script: #!/bin/bash PREFIX="A2B1 " TABLE="sqltablename" COLUMN="sqlcolumnname" if [[ ! -r "$1" ]]; then echo "unable to read file '$1'" exit 1 fi cut -d, -f2 "$1" | while read phonenum; do newnum="$PREFIX $phonenum" echo "UPDATE $TABLE SET $COLUMN = '$newnum' WHERE $COLUMN = '$phonenum';" done This will, if you run it with ...


1

I dunno about "best" way, but I would probably not do it in parallel, just something simple like for sql in *.sql; do mysql options <"$sql" done If you need to do it in parallel: for prefix in File1 File2; do for sql in ${prefix}_*.sql; do mysql options <"$sql" & done wait done This will first take the File1* files and start ...


0

It looks like you're missing the stderr redirection from run_wrapper.sh itself, so the errors aren't going through the grep and thence to the log file. Try this instead if you're happy to have both stdout and sdterr written to your logfile run_wrapper.sh 2>&1 | grep -v "Warning: Using a password" > output.log Or if you want only the errors ...


0

Try this: lf='output.log' > "$lf" # first truncate/create the logfile. run_wrapper.sh >> "$lf" 2> >(grep -v "Warn.*passw.*insec" >> "$lf") Redirects stderr via Process Substitution to grep -v ..., and output from that is appended with >> to output.log You probably want to use (GNU) grep's --line-buffered option as well as -v ...



Top 50 recent answers are included