What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-27 19:01:01
docker how to run command in mysql
# If you run the container with a command like the following: # sudo docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag sudo docker exec -t -i some-mysql /bin/bash mysql -uroot -pmy-secret-pw # An example below: sudo docker ru... Add solution -
PHP 2021-08-27 17:08:02
Export database to sql dump in php
<?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $dbname = 'test'; $mysqldump=exec('which mysqldump'); $command = "$mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname > $dbname.sql"; exec($command); ?> Add solution -
SQL 2021-08-27 16:26:02
mysql user grant database
-- Grants / privileges list SELECT * FROM information_schema.user_privileges; SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') FROM mysql.user; -- Grant a user /* ALL PRIVILEGES All privileges CREATE Create databases and tables ... Add solution -
Shell/Bash 2021-08-27 15:42:01
ubuntu install php
# Update packages lists sudo apt update # Install Apache2 (on Ubuntu, mostly it's already installed) sudo apt install apache2 # Install the latest version of PHP and Apache wrapper sudo apt install php libapache2-mod-php # Install some important PHP ex... Add solution -
Shell/Bash 2021-08-27 13:07:01
how to uninstall iredmail
sudo apt-get remove --purge postfix* nginx* sa-compile* dovecot* fail2ban* ldap* mysql* sogo* clamav* amavis* nginx* php* mlmmj* sudo apt-get autoremove --purge sudo rm -rf /var/run/mysql /var/run/amavis /var/run/mlmmjadmin /var/run/iredadmin /var/run/f... Add solution -
SQL 2021-08-27 12:42:01
create database dynamically sql server using sequalize
const config = require('config.json'); const mysql = require('mysql2/promise'); const { Sequelize } = require('sequelize'); module.exports = db = {}; initialize(); async function initialize() { // create db if it doesn't already exist const { h... Add solution