Skip to content

Instantly share code, notes, and snippets.

@danilobatistaqueiroz
Last active July 3, 2023 01:48
Show Gist options
  • Save danilobatistaqueiroz/44723c54caabe089da4986e69d72d9a6 to your computer and use it in GitHub Desktop.
Save danilobatistaqueiroz/44723c54caabe089da4986e69d72d9a6 to your computer and use it in GitHub Desktop.
mariadb standalone without admin rights

Installing Mariadb standalone without admin rights

download zip version:

https://downloads.mariadb.org/mariadb/5.5.29/#os_group=linux_generic&os_group=windows&file_type=tar_gz&file_type=zip

unpack

inside bin folder execute the command line: mysqld --no-defaults or mysqld --console

open another cmd/bash window and type:
mysql -u root -p

enter a blank password on the first time.

now, create a new user:
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

if you want to change the password:
SET PASSWORD FOR 'jeffrey'@'localhost' = PASSWORD('cleartext password');

grant admin privileges:
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

FLUSH PRIVILEGES;

create a database:
CREATE DATABASE <<databasename>>;

list the databases:
show databases;

use a database:
use <<databasename>>;

create a table:
CREATE TABLE name (column1 VARCHAR(20), column2 VARCHAR(30), column3 CHAR(1), column4 DATE);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment