I run this command in my Centos 7 server:
frappe#vps [~/frappe-bench]# bench new-site erp.local
but I got this error:
frappe#vps [~/frappe-bench]# bench new-site erp.local
MySQL root password:
================================================================================
Creation of your site - erp.local failed because MariaDB is not properly
configured to use the Barracuda storage engine.
Please add the settings below to MariaDB's my.cnf, restart MariaDB then
run `bench new-site erp.local` again.
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
================================================================================
frappe#vps [~/frappe-bench]#
When I see /etc/my.cnf file, I encounter this:
!includedir /etc/my.cnf.d
So, I look at that folder and then opened "settings.cnf" file and I have found exact the same configuration.
What else do I have to see?
Regards
Jaime
add the following information to /etc/mysql/mariadb.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
then 'flush privileges;' MariaDB database
Please have maria db version 10.2 then site will create easily else it wont create.
Use below commands to reinstall mariadb-10.2
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=i386,ppc64el,amd64] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu bionic main'
sudo apt-get update
sudo apt-get install -y mariadb-server-10.2 mariadb-client-10.2
Related
import pyodbc
pyodbc.connect('Driver={SQL SERVER};'
'Server=server name;'
'Database = database name;'
'UID='my uid;'
'PWD= 'my password;'
'Authentication = ActiveDirectoryPassword')
running above code in databrick notebook i am getting following error
Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL SERVER' : file not found (0) (SQLDriverConnect)")
By default, Azure Databricks does not have ODBC Driver installed.
For SQL Server: You can resolve the issue by using the following script
sudo apt-get -q -y install unixodbc unixodbc-dev
sudo apt-get -q -y install python3-dev
sudo pip install --upgrade pip
pip install pyodbc
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -q -y install msodbcsql
For Azure SQL Database: Run the following commands in a single cell to install MY SQL ODBC Driver on Azure Databricks cluster.
%sh
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -q -y install msodbcsql17
What you posted looks like straight Python code. In the Databricks environment, things are a little different than they are on your local machine.
Try it like this.
import pyodbc
server = '<server>.database.windows.net'
database = '<database>'
username = '<username>'
password = '<password>'
driver= '{ODBC Driver 17 for SQL Server}'
cnxn = pyodbc.connect('DRIVER='+driver+';SERVER='+server+';PORT=1433;DATABASE='+database+';UID='+username+';PWD='+ password)
cursor = cnxn.cursor()
cursor.execute("SELECT TOP 20 pc.Name as CategoryName, p.name as ProductName FROM [SalesLT].[ProductCategory] pc JOIN [SalesLT].[Product] p ON pc.productcategoryid = p.productcategoryid")
row = cursor.fetchone()
while row:
print (str(row[0]) + " " + str(row[1]))
row = cursor.fetchone()
I have installed mariadb using below commands:
yum install MariaDB-server MariaDB-client -y
But when execute commane:
service mysqld start
Error is coming:
mysqld: unrecognized service
Please let us know what wrong I am doing or what additionally I have to do to make it work.
Firstly verify that service sees MySQL using command:
sudo service --status-all
If you see MySQL there run command:
sudo service mysql start
I have set up a Vagrant machine with this configuration --
Vagrant.configure("2") do |config|
config.vm.box = "intprog/centos7-ez6"
config.ssh.insert_key = false
config.vm.network "public_network", ip: "192.168.33.243"
config.vm.provision "file", source: "/server/bin/nginx/conf/domains-enabled/cemcloudMigration.conf", destination: "~/cemcloud.conf"
config.vm.provision "shell", path: "webroot/bootstrap/script.sh"
end
This is how my script looks like -- sudo su
#update the centos version
#yum update -y
yum -y erase httpd httpd-tools apr apr-util
#getting nginx from the right address
yum install -y http://http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.10.0-1.el7.ngx.x86_64.rpm
yum install -y nginx
#installing composer
curl -sS https://getcomposer.org/installer | php
chmod +x composer.phar
mv composer.phar /usr/bin/composer
cd /srv/www/cemcloud2
composer install
#removal of old mariadb5.5 and installation of the new one
yum -y remove mariadb-server mariadb mariadb-libs
yum clean all
yum -y install MariaDB-server MariaDB-client
#clear unnecessary software
yum -y remove varnish
## restart the service
service mysql restart
service php-fpm restart
service nginx restart
/var/log/nginx/access.log is producing this --
10.0.2.2 - - [17/Oct/2016:11:42:10 +0000] "GET / HTTP/1.1" 301 185 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101
Firefox/51.0" "-"
Really strange behavior from nginx because it some times produces log and sometimes it doesn't. When I open up my firefox developer it produces log and when I am on google chrome it doesn't.
Every time I put in the URL into browser it says
the connection has timed out.
Anyhow I want to get connected to this machine. What am I doing wrong ??
Please check your network on the guest-mashine with:
nmap -sT -O localhost
Check if the ports your are using in your nginx configuration are open.
If not, open them in your firewall and check again.
It was a firewall issue inside this machine "intprog/centos7-ez6". It wasn't listening to the port https.
I have followed those steps:
firewall-cmd --add-service=https
firewall-cmd --add-service=https --permanent
firewall-cmd --reload
and it all worked.
I am trying to install phpmyadmin + mariadb.
My PHP configure string has the following mysql flags
CONFIGURE_STRING="--prefix=/etc/php7 --enable-mysqlnd --with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd <and other flags>"
I installed mariadb with the following:
sudo apt-get install mariadb-client mariadb-server
sudo mysql_secure_installation
I can login with a password via
sudo mysql -u root -p
Then I installed phpmyadmin with
cd /var/www/html
git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git
mv phpmyadmin datastore #change name to datastore
When I open http://localhost/datastore I received the phpmyadmin login page; in attempt to login with root username and root password, i received the following error:
#2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).
AND
mysqli_real_connect(): (HY000/2002): No such file or directory.
I am using php7 on ubuntu 14.04.
I wish to be able to connect mariadb and phpmyadmin.
Got some directions from Git on how to solve the problem and these are my steps, I feel someone may encounter the same challenge.
In phpmyadmin copy config.sample.inc.php into config.inc.php
sudo cp config.sample.inc.php config.inc.php
Check MariaDB status with STATUS;
MariaDB [(none)]>STATUS; [ENTER]
Check Connection - if localhost via Unix Socket then copy unix socket value.
Go to config.inc.php and force the following
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';
Then change permission of config.inc.php in phpmyadmin
sudo chmod 0755 config.inc.php
Point your browser to phpmyadmin and login with your username and password.
Git link
I had installed nginx and lua in my docker image, but I didn't install nginx on my physical CentOS system. I "docker run my image" and start nginx on my physical CentOS system. So the nginx master and worker process are working. I run an example of nginx-systemtap-toolkit. I run:
sudo ./ngx-active-reqs -p 24945
24945 is worker process id. errors as following:
semantic error: while resolving probe point: identifier 'process' at <input>:6:7
source: probe process("/data1/nginx/sbin/nginx").function("ngx_process_events_and_timers"),
^
semantic error: no match
Pass 2: analysis failed. [man error::pass2]
Number of similar error messages suppressed: 1
In fact, "/data1/nginx/sbin/nginx" is the nginx path in docker image, nginx is not installed on my physical system. So whether I must install nginx on my physical system , or is there other method to use nginx's process function? I don't know how to solve the problem.
To install debug symbol which package is not included in the repositories in the form of -dbg package, you need to add a new repository as detailed in the Debugging Guide:
Add the repositories:
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com $(lsb_release -cs)-security main restricted universe multiverse
deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
Add the GPG key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 428D7C01
Update your package list:
sudo apt-get update
Install the debugging symbols package, in this case coreutils-dbgsym:
sudo apt-get install coreutils-dbgsym