Skip to content

Instantly share code, notes, and snippets.

@ahmadrosid
Last active June 17, 2020 18:17
Show Gist options
  • Save ahmadrosid/1f47bda961ce6ed71abe3a33d0dad0d8 to your computer and use it in GitHub Desktop.
Save ahmadrosid/1f47bda961ce6ed71abe3a33d0dad0d8 to your computer and use it in GitHub Desktop.

Manjaro install mariadb

sudo pacman -S mariadb
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl start mariadb
sudo systemctl enable mariadb

Create user

CREATE USER 'ahmadrosid'@'localhost' IDENTIFIED BY 'secret';

Grant all permission

GRANT ALL PRIVILEGES ON *.* TO 'ahmadrosid'@'localhost';

Reload permission

FLUSH PRIVILEGES;

Insert data

INSERT INTO `contacts` (`id`, `kw_uid`, `contact_id`, `hash`, `created_at`, `updated_at`)
VALUES
    (1, 556396, 3858943, '0794091a-433a-11ea-b8e3-0a580a01007a', '2020-01-30 19:33:39', '2020-01-30 19:33:39'),
    (2, 556396, 30001, 'b6f38b5d-b70d-3f48-8889-6080439ae268', '2020-01-30 19:33:39', '2020-01-30 19:33:39');

Update data

UPDATE contacts
SET contact_id = '3978374'
WHERE id = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment