How to create SOLR cores on Azure hosted SOLR service?
We are going to work through two methods of creating the SOLR cores.
Variables for reference used in this article:
{ip_address} - your server IP Address
{name} - name of the instance you are creating
{dir} - name of the instance directory you are creating
Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
When attempting to backup mysql using the mysqldump command
mysqldump -u root -p database_name > backup.sql
However, it is throwing an error:
mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
What to do?
How to remove all files from a directory?
To remove all the contents from a directory, you need to ask yourself:
Do I want to remove everything including the directory itself?
To remove a directory with all its contents (including all interior folders):
rm -rf /path/to/directory
Do I want to keep the directory, but delete everything else?
Need to remove all the contents of the directory (including all interior directories) but not the directory itself:
Adding a Git repo to a server
git clone git@bitbucket.org:{username}/{repo}.git
And I was unceremoniously delivered the following error
fatal: could not create work tree dir '{project}
': Permission denied
My initial thought was the error due to server permission... being sudo. This was tested by running the command
sudo git clone git@bitbucket.{username}/{repo}.git
Which generated the error
How to Create New MySQL User
How to Create New MySQL User
Before you can create a new MySQL user, you need to open a terminal window and launch the MySQL shell as the root user. To do so, enter the following command:
sudo mysql –u root –p
or rather than typing sudo each time you can enter:
sudo su mysql -u root -p
In either scenario next type in the root password and press Enter.
The prompt will change to
mysql>
How To Update All Packages Linux
In the terminal type, the following command:
sudo apt update
After typing the above command, enter your password.
Adding Solr config zip to your remote server
Adding Solr config zip (ie. solr_8.x_config.zip) to your remote server. In this instance I'll be adding Solr config to a AWS EC2 server.
Log in to your remote server, then as you need to work as root type:
sudo su
Go to your solr directory:
cd /var/solr/
If you don't know the location of your solr directory run:
Formatting how date/time is displayed in Drupal 8/9
You can create a new date/time format by navigating to:
Admin -> Configuration -> Regional and Language -> Date and Time format and click on 'Add Format'.
Once you’ve created date format, you can control the way date is displayed on the node using preprocess function.
In {theme_name}.theme file, add the following lines
How merge a View exposed form with pager?
To assist in finding possible solutions some of the queries that I made include:
- Drupal 9 pager with items_per_page
- Drupal 9 pager merged with exposed form items_per_page
How do I get a page’s current URL in Twig for Drupal 9
Having access to a site’s URL in your templates can come in handy for many different use cases, such as determining if your on the admin/people page as apposed to admin/reports/dblog or admin/content. These three pages might seem to bear on common relationship, however there is at least one. Users.
I edited the user in the admin/people page so rather than showing just username, know shows: