Installing WordPress on a FreeNAS Jail

After creating a basic jail do this:
Step 1 Configue the the Jail to Use SSH
https://www.ixsystems.com/documentation/freenas/11.2-U6/jails.html#accessing-a-jail-using-ssh
Step 2 – Setup Apache, MySQL and PHP – NOTE: Make changes for your version of PHP
https://www.digitalocean.com/community/tutorials/how-to-install-an-apache-mysql-and-php-famp-stack-on-freebsd-10-1
with minor changes from
https://www.howtoforge.com/install-apache-php-mysql-on-freebsd-12/
Step 3 – install workpress
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-apache-on-freebsd-10-1

How to Change Authentication Method in MySQL

First, to check what is being used run this,
SELECT user, authentication_string, plugin, host FROM mysql.user;
If the user you are having issues with is set to auth_socket then you may need to change it to method with mysql_native_password
Like this,
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Change root to the user you need and set the password to whatever the password is supposed to be.

ORA-27121: unable to determine size of shared memory segment

If when you are trying to login to Oracle 10G on linux you get :

ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
Linux Error: 13: Permission denied

This is caused by Oracle installer not setting setuid on $ORACLE_HOME/bin/oracle.
To fix do:

$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle

via http://www.jasonash.com/techblog/index.php/linux/ora-27121-unable-to-determine-size-of-sh

Grid Control access to a Windows server


If you are trying to get Grid Control to access a Windows server and having trouble here’s a few things to check.

  1. Check that the host name credentials you are providing are the same as the user who install the database software on the Windows server.
  2. Check that the user is a member of the ora_dba local group on the server and
  3. Check that the Log on as a batch job local security privilege has been turned on.

Continue reading Grid Control access to a Windows server

Creating a link between two SQL servers

To create a link between two SQL Servers you need to use the sp_addlinkedserver and sp_addlinkedsrvlogin stored procedures.
First,

sp_addlinkedserver @server='DBLINK01',@srvproduct='',@provider='SQLOLEDB',@datasrc='SQL-HOU-01';

Where,
@server is the name of the link
@srvproduct is the type of product, by default SQL Server
@datasrc is the server you link to
Then, you need to set the username and password to use on the link.

sp_addlinkedsrvlogin 'DBLINK01','false',null,'sa','Pa$$w0rd';

The first parameter is the name of the link to use,
The fourth is the account of the remote server to use,
The fifth is the password for the account.

Manually adding a mail account to SQL2005/2008

I was having trouble adding configuring Database Mail on a SQL2005 server today.
I followed the wizard just like I had done on the previous 6 servers, but this one just didn’t want to add it. It was giving me an error about not being able to insert a NULL into the server name field, although I was giving it a server name.
I tried manually adding the data into the table, but of course that didn’t work. You have to use a stored procedure.
You need to use msdb.dbo.sysmail_add_account_sp with options like below,

msdb.dbo.sysmail_add_account_sp @account_name='company.com mail server',@email_address='john.doe@company.com',@display_name='John Doe',@replyto_address='john.doe@company.com',@mailserver_name='mail.company.com',@port=25;