Raised This Month: $51 Target: $400
 12% 

Solved not connect default databases


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Danielej1
Senior Member
Join Date: Jul 2022
Location: Poland
Old 10-13-2022 , 14:12   not connect default databases
Reply With Quote #1

Hello i having problem with localhost i cant connect with him, who can help me?


DATABSES:

{
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "localhost:/var/run/mysqld/mysqld.sock"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

LOGS:
L 10/13/2022 - 08:42:14: [admin-sql-prefetch.smx] Could not connect to database "default": [2005]: Unknown MySQL server host 'localhost:/var/run/mysqld/mysqld.sock' (22)
L 10/13/2022 - 08:42:14: [admin-sql-prefetch.smx] Could not connect to database "default": [2005]: Unknown MySQL server host 'localhost:/var/run/mysqld/mysqld.sock' (22)
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admin_groups.cfg
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] (line 13) Line contained too many invalid tokens
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admin_groups.cfg
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] (line 13) Line contained too many invalid tokens
L 10/13/2022 - 08:42:14: [admin-sql-prefetch.smx] Could not connect to database "default": [2005]: Unknown MySQL server host 'localhost:/var/run/mysqld/mysqld.sock' (22)
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admins_simple.ini
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] (line 42) Invalid flag detected: A
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] (line 42) Invalid flag detected: -
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] (line 42) Invalid flag detected: -
L 10/13/2022 - 08:42:14: [admin-flatfile.smx] (line 42) Invalid flag detected: -

Last edited by Danielej1; 10-16-2022 at 09:21.
Danielej1 is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 10-14-2022 , 08:54   Re: not connect default databases
Reply With Quote #2

On Linux is better to use 127.0.0.1 than localhost

Still you need to have terminal installed mysql and not using XAMPP, WAMP etc cause they have mysqld.sock in their own folder and not in /var/run/mysqld were Source Mod is looking for.

use this comand to see if MySQL is installed
Code:
service status mysql
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
Danielej1
Senior Member
Join Date: Jul 2022
Location: Poland
Old 10-14-2022 , 09:16   Re: not connect default databases
Reply With Quote #3

yeah i repair that but now are bugs, how i can repair? i dont having root on databases i haivng purchased maria db and i dont having root


L 10/14/2022 - 12:07:21: [admin-sql-threaded.smx] SQL error receiving user: Table 'db_86386.sm_admins' doesn't exist
L 10/14/2022 - 12:07:21: [admin-sql-threaded.smx] Query dump: SELECT a.id, a.authtype, a.identity, a.password, a.flags, a.name, COUNT(ag.group_id), immunity FROM sm_admins a LEFT JOIN sm_admins_groups ag ON a.id = ag.admin_id WHERE (a.authtype = 'ip' AND a.identity = '212.106.161.193') OR (a.authtype = 'name' AND

Last edited by Danielej1; 10-14-2022 at 09:24.
Danielej1 is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 10-14-2022 , 10:12   Re: not connect default databases
Reply With Quote #4

Execute this on phpmyadmin on empty database and then add your admin on sm_admins tab
You dont need root access to mysql only full permisions on your user
Code:
CREATE TABLE sm_admins (
  id int(10) unsigned NOT NULL auto_increment,
  authtype enum('steam','name','ip') NOT NULL,
  identity varchar(65) NOT NULL,
  password varchar(65),
  flags varchar(30) NOT NULL,
  name varchar(65) NOT NULL,
  immunity int(10) unsigned NOT NULL,
  PRIMARY KEY (id)
);

CREATE TABLE sm_groups (
  id int(10) unsigned NOT NULL auto_increment,
  flags varchar(30) NOT NULL,
  name varchar(120) NOT NULL,
  immunity_level int(1) unsigned NOT NULL,
  PRIMARY KEY (id)
);

CREATE TABLE sm_group_immunity (
  group_id int(10) unsigned NOT NULL,
  other_id int(10) unsigned NOT NULL,
  PRIMARY KEY (group_id, other_id)
);

CREATE TABLE sm_group_overrides (
  group_id int(10) unsigned NOT NULL,
  type enum('command','group') NOT NULL,
  name varchar(32) NOT NULL,
  access enum('allow','deny') NOT NULL,
  PRIMARY KEY (group_id, type, name)
);

CREATE TABLE sm_overrides (
  type enum('command','group') NOT NULL,
  name varchar(32) NOT NULL,
  flags varchar(30) NOT NULL,
  PRIMARY KEY (type,name)
);

CREATE TABLE sm_admins_groups (
  admin_id int(10) unsigned NOT NULL,
  group_id int(10) unsigned NOT NULL,
  inherit_order int(10) NOT NULL,
  PRIMARY KEY (admin_id, group_id)
);

CREATE TABLE IF NOT EXISTS sm_config (
  cfg_key varchar(32) NOT NULL,
  cfg_value varchar(255) NOT NULL,
  PRIMARY KEY (cfg_key)
);

INSERT INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409') ON DUPLICATE KEY UPDATE cfg_value = '1.0.0.1409';
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 10-14-2022 at 10:13.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode